Hide Forgot
On a POSIX filesystem: ext3$ setfacl -d -m mask::rwx . ext3$ umask 027 ext3$ mkdir subdir ext3$ ls -ld subdir drwxrwxr-x+ 2 lkundrak lkundrak 4096 Nov 2 20:12 subdir ext3$ On GlusterFS: glusterfs$ setfacl -d -m mask::rwx . glusterfs$ umask 027 glusterfs$ mkdir subdir glusterfs$ ls -ld subdir drwxr-x---+ 2 root root 4096 Nov 2 20:19 subdir glusterfs$ The umask is not supposed to be applied in case extended acls are present. Unfortunately, FUSE used to resolve umask itself, loosing the information of intended creation mode and umask before passing it to the filesystem server. Precisely for this reason (correct support of POSIX ACLs) FUSE_DONT_MASK was added. I'm not sure how to fix that. Here's what I've done to mkdir() call: https://github.com/lkundrak/glusterfs/commit/6e1cceafb338a696e2010ca7f895d6c15d886c7b Would this be correct? Is mixing different versions of client and server supported, and if yes, does this break the protocol? If yes, let me know and I'll proceed modifying other file creation calls, otherwise please point me to the right direction. Thanks!
Reworked the patches to utilize the parameters dictionaries instead of breaking the protocol. Submitted for review: http://review.gluster.com/667 http://review.gluster.com/668
Csaba Henk sent some review comments on the submitted patches. Please see if the patch can be resubmitted with comments incorporated.
Amar, thank you. I've addressed all Csaba's comments and submitted a new set of patches.
CHANGE: http://review.gluster.com/667 (fuse-bridge: preserve original mode and umask) merged in master by Anand Avati (avati)
CHANGE: http://review.gluster.com/668 (posix-acl: properly process umask in case client sent it) merged in master by Anand Avati (avati)
I tested this on 3.3git and the issue is still not fixed. # dmesg | grep -i fuse [ 0.553091] fuse init (API version 7.16) On ext3 # setfacl -d -m mask::rwx . # umask 027 # mkdir subdir # ls -ld subdir drwxrwxrwx+ 2 root root 4096 2012-01-17 14:56 subdir On glusterfs # setfacl -d -m mask::rwx . # umask 027 # mkdir subdir # ls -ld subdir drwxrwx---+ 2 root root 8192 2012-01-17 14:58 subdir
I will take a look. Which exact version of server and client were you using?
GlusterFS is from latest git pull (master branch).
QA says this bug is not yet fixed in master branch. Moving it to assigned.
I could not reproduce the behavior above on neither RHEL 6.2 nor Fedora 17 -- for me it behaves both correctly and consistently. Please ensure that the parent directory has the same mode and ACL on both ext3 and glusterfs when checking for regressions. If you manage to reproduce the behavior you describe, please include information about mode and ACL of the parent directory (your working directory, one level above "subdir"). Thank you.
Seems like I can't switch this back to ON_QA, only to CLOSED. Closing in hope to get QA attention.