We are seeing some strange behaviour with the v3.13 version of aufs3.
Specifically when you chown() a directory it gets copies up and the
ownership is correctly changed:

As root:

  + ls -ld /tmp/t/a
  drwx------ 2 root root 4096 Apr  8 19:18 /tmp/t/a
  + chown apw /tmp/t/a
  + ls -ld /tmp/t/a
  drwx------ 2 apw root 4096 Apr  8 19:18 /tmp/t/a
  + sudo -u apw ls /tmp/t/a
  ls: cannot open directory /tmp/t/a: Permission denied
  + ls -ld /tmp/t/a
  drwx------ 2 apw root 4096 Apr  8 19:18 /tmp/t/a

This seems to occur because reads of directories are handled specially
in aufs_permission(), we have to be able to perform the read in all
layers before a read is permitted whilst a write only requires the
top-level to be writable.

As the code is specifically different for the read on a directory
case, I assume there is some specific reason for this but I am
struggling to understand it in order to work out if you intend to
prevent the above use case.

Thanks in advance.

-apw

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees

Reply via email to