[Bugs] [Bug 1405147] glusterfs (posix-acl xlator layer) checks for " write permission" instead for "file owner" during open() when writing to a file

bugzilla at redhat.com bugzilla at redhat.com
Fri Dec 16 11:28:34 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1405147



--- Comment #5 from omar at dit.upm.es ---
Sorry to all, I have to apologize because I tried to super-simplify the problem
in the explanation without remembering properly previous tests made and
possible issues discarded... 

The origin of this problem is about copying a read-only file, not about writing
data on it.

Tell me if you think maybe is better to file a new bug or to explain it again
in this bug report.

If the later, the explanation would be the following (based on
http://marc.info/?l=linux-nfs&m=147932042025835):

Description of problem:
When you export a glusterfs fuse-mounted volume through a nfs-kernel-server, if
the nfs-client mounting it tries to copy an owned read-only file -not being
root user-, a permission denied error shows up at the client side and it is
recorded at the glusterfs logs. 

If the user is root no problem exist.

Version-Release number of selected component (if applicable):
All versions tested (glusterfs-3.7.{4-16}, glusterfs-3.8.{4-5})

How reproducible:
Always

Steps to Reproduce:
The setup is:

      nfs client---NFSv3--->knfsd---FUSE-->gluster

The tests are:

# At the knfsd server:
root at cuentas03-lab:/etc# cat /proc/mounts
[...]
recipiente6hd:/home-lab-3.tcp /home-3-old fuse.glusterfs
rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072
0 0
root at cuentas03-lab:/etc#

# At the nfs-client:
cdc at l056:~$ cat /proc/mounts | grep "/home/cdc"
cuentas03:/home-3-old/cdc /home/cdc nfs
rw,noatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=138.4.30.18,mountvers=3,mountport=49531,mountproto=tcp,fsc,local_lock=all,addr=138.4.30.18
0 0
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$ rm -f kk.txt 444.txt; echo "prueba" > 444.txt; chmod 444 444.txt;
cp -p 444.txt kk.txt; ls -ld 444.txt kk.txt
cp: failed to close ‘kk.txt’: Permission denied
-r--r--r-- 1 cdc admincdc 7 nov 16  2016 444.txt
-r--r--r-- 1 cdc admincdc 0 nov 16  2016 kk.txt
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$
cdc at l056:~$ sudo su
root at l056:/home/cdc# rm -f kk.txt 444.txt; echo "prueba" > 444.txt; chmod 444
444.txt; cp -p 444.txt kk.txt; ls -ld 444.txt kk.txt
-r--r--r-- 1 root root 7 nov 16  2016 444.txt
-r--r--r-- 1 root root 7 nov 16  2016 kk.txt
root at l056:/home/cdc# exit
cdc at l056:~$ 

Actual results:
As a nfs-client of a fuse-mounted glusterfs volume, a user who owns a file that
is read-only cannot copy it to a new file.

Expected results:
As a nfs-client of a fuse-mounted glusterfs volume, a user who owns a file that
is read-only should be able to copy it even if it is read-only.

Hope this helps to clarify. Sorry for the noise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list