aufs user permissions
- by user56395
Anyone know why this doesn't work? Is this user error, AUFS feature or bug maybe:
rac@tecraS1:~/tmp$ mkdir orig tmp au
rac@tecraS1:~/tmp$ sudo mount -t tmpfs none tmp
rac@tecraS1:~/tmp$ sudo chown -R rac tmp
rac@tecraS1:~/tmp$ echo hello > orig/hello
rac@tecraS1:~/tmp$ sudo mount -t aufs -o br=tmp:orig none au
rac@tecraS1:~/tmp$ ls -al au
total 8
drwxrwxrwt 4 rac root 100 2011-01-06 13:53 .
drwxr-xr-x 5 rac rac 4096 2011-01-06 13:52 ..
-rw-r--r-- 1 rac rac 6 2011-01-06 13:53 hello
rac@tecraS1:~/tmp$ rm au/hello
rm: cannot remove `au/hello': Operation not permitted
rac@tecraS1:~/tmp$
Seems the aufs files were created as root and user has no access to them:
rac@tecraS1:~/tmp$ sudo rm au/hello
rac@tecraS1:~/tmp$ ls -al tmp
total 4
drwxrwxrwt 4 rac root 120 2011-01-06 13:53 .
drwxr-xr-x 5 rac rac 4096 2011-01-06 13:52 ..
-r--r--r-- 2 root root 0 2011-01-06 13:53 .wh.hello
-r--r--r-- 2 root root 0 2011-01-06 13:53 .wh..wh.aufs
drwx------ 2 root root 40 2011-01-06 13:53 .wh..wh.orph
drwx------ 2 root root 40 2011-01-06 13:53 .wh..wh.plnk
rac@tecraS1:~/tmp$
OS is the latest Lucid with 2.6.35-23 stock kernel. No idea about aufs version.
Using sudo chown -R rac tmp/.wh* fixes the problem.
Thanks for looking.