hi, I have met a permission problem for directory in aufs, below is my command line output:
========================================= [wuhp@test002 /]$ ll /tmp/aufs/ total 20 drwxr-xr-x 5 wuhp wuhp 4096 2013-01-06 02:35 ./ drwxrwxrwt 5 root root 4096 2013-01-06 01:54 ../ drwxr-xr-x 2 wuhp wuhp 4096 2013-01-06 01:55 mnt/ drwxr-xr-x 3 root root 4096 2013-01-06 02:36 root/ drwxr-xr-x 2 wuhp wuhp 4096 2013-01-06 02:35 temp/ [wuhp@test002 /]$ ll /tmp/aufs/root total 12 drwxr-xr-x 3 root root 4096 2013-01-06 02:36 ./ drwxr-xr-x 5 wuhp wuhp 4096 2013-01-06 02:35 ../ drwx------ 2 root root 4096 2013-01-06 02:08 test2/ [wuhp@test002 /]$ sudo mount -t aufs -o br:/tmp/aufs/temp=rw:/tmp/aufs/root=ro+wh none /tmp/aufs/mnt [wuhp@test002 /]$ stat /tmp/aufs/mnt/test2 File: `/tmp/aufs/mnt/test2' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 2bh/43d Inode: 11 Links: 2 Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-01-06 02:08:19.813238591 -0700 Modify: 2013-01-06 02:08:19.813238591 -0700 Change: 2013-01-06 02:27:29.313239019 -0700 [wuhp@test002 /]$ touch /tmp/aufs/mnt/test2/a touch: cannot touch `/tmp/aufs/mnt/test2/a': Permission denied [wuhp@test002 /]$ sudo chmod 777 /tmp/aufs/mnt/test2 [wuhp@test002 /]$ stat /tmp/aufs/mnt/test2 File: `/tmp/aufs/mnt/test2' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 2bh/43d Inode: 11 Links: 2 Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-01-06 02:08:19.813238591 -0700 Modify: 2013-01-06 02:08:19.813238591 -0700 Change: 2013-01-06 02:39:19.423239284 -0700 [wuhp@test002 /]$ touch /tmp/aufs/mnt/test2/a touch: cannot touch `/tmp/aufs/mnt/test2/a': Permission denied ========================================= I can't create file even if I have write permission to "/tmp/aufs/mnt/test2", can anyone tell me why and how to fix it? Here is my workstation info: ------- [wuhp@test002 /]$ cat /sys/module/aufs/version 2.1-standalone.tree-38-rcN-20110207 [wuhp@test002 /]$ uname -a Linux test002 2.6.38-16-generic #67~lucid1-Ubuntu SMP Fri Sep 7 18:18:45 UTC 2012 x86_64 GNU/Linux ------- More findings, if /tmp/aufs/root/test has execute permission, the workflow above works, strange behavior. ========================================= [wuhp@test002 /]$ sudo chmod 711 /tmp/aufs/root/test2 [wuhp@test002 /]$ stat /tmp/aufs/root/test2 File: `/tmp/aufs/root/test2' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 801h/2049d Inode: 142665 Links: 2 Access: (0711/drwx--x--x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2013-01-06 02:08:19.813238591 -0700 Modify: 2013-01-06 02:08:19.813238591 -0700 Change: 2013-01-06 02:43:47.463239384 -0700 [wuhp@test002 /]$ touch /tmp/aufs/mnt/test2/a [wuhp@test002 /]$ stat /tmp/aufs/temp/test2/a File: `/tmp/aufs/temp/test2/a' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 801h/2049d Inode: 142669 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ wuhp) Gid: ( 1000/ wuhp) Access: 2013-01-06 02:44:12.613239392 -0700 Modify: 2013-01-06 02:44:12.613239392 -0700 Change: 2013-01-06 02:44:12.613239392 -0700 ========================================= thanks, haipeng
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012