Description of problem:
I have changed /etc/default/docker/ file in order to set the -g with a place having a lot of free space , but when I run container then I found the permission of tmp directory inside container was drwxr-xr-t (Expected to be drwxrwxrwt ). I cannot write anythings if i was a non root user in container.
root@iZ25rwmaxf8Z:~# sudo docker run -ti -h demo ubuntu:14.04 /bin/bash
root@demo:/# ls -la / | grep tmp
drwxr-xr-t 2 root root 4096 Jan 27 04:03 tmp
Information:
docker version
root@iZ25rwmaxf8Z:~# docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:37:18 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:37:18 UTC 2015
OS/Arch: linux/amd64
docker info
root@iZ25rwmaxf8Z:~# docker info
Containers: 39
Images: 410
Storage Driver: aufs
Root Dir: /data/docker/aufs
Backing Filesystem: extfs
Dirs: 492
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-32-generic
Operating System: Ubuntu 14.04.2 LTS
CPUs: 2
Total Memory: 3.859 GiB
Name: iZ25rwmaxf8Z
ID: 5RQU:CJY4:53CW:ZQOU:RQ6J:GQZN:UCQQ:WMWL:HHMW:XPJW:YTAR:4M2T
WARNING: No swap limit support
root@iZ25rwmaxf8Z:~#
uname -a
Linux iZ25rwmaxf8Z 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
environment details: Elastic Compute Service
Additional info
/dev/xvdb1 was mount on /data
root@iZ25rwmaxf8Z:~# fdisk -l
Disk /dev/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000da36d
Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 41940991 20969472 83 Linux
Disk /dev/xvdb: 107.4 GB, 107374182400 bytes
240 heads, 16 sectors/track, 54613 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x025c8f66
Device Boot Start End Blocks Id System
/dev/xvdb1 2048 209715199 104856576 83 Linux
Actual Results:
permission of tmp directory in container is drwxr-xr-t
Expected Results:
permission of tmp directory in container is drwxrwxrwt
Thank you .
Wow ,Sorry. It was my mistake.
I used the wrong copy command cp -rv /var/lib/docker /data when copying old files to new directory. it lost the write permission.
The right command is
cp -rpv /var/lib/docker /data
I will close the issue.
Most helpful comment
Wow ,Sorry. It was my mistake.
I used the wrong copy command
cp -rv /var/lib/docker /datawhen copying old files to new directory. it lost the write permission.The right command is
I will close the issue.