TL;DR: I don't understand why I can access one file but not an other (in the same directory), although they appear to have identical permissions.
I have an NFS server running Solaris 10 10/08 and a client on Ubuntu 12.04. I mount a ZFS snapshot like this:
# mount | grep homes
server:/homes/.zfs/snapshot on /u/homes type nfs (ro,noatime,vers=3,intr,sloppy,addr=1.2.3.4)
Then I look at these two files in /u/homes
:
# ls -l 1.txt 2.txt
-rw-r--r--+ 1 usr grp 2.2K Oct 12 13:42 1.txt
-rw-r--r--+ 1 usr grp 2.1K May 31 2013 2.txt
# stat 1.txt
File: `1.txt'
Size: 2170 Blocks: 4 IO Block: 1048576 regular file
Device: 43h/67d Inode: 1621536 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2428/ usr) Gid: ( 2000/ grp)
Birth: -
# stat 2.txt
File: `2.txt'
Size: 2146 Blocks: 3 IO Block: 1048576 regular file
Device: 43h/67d Inode: 7975730 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2428/ usr) Gid: ( 2000/ grp)
Birth: -
Same files when viewed on the server:
File: `1.txt'
Size: 2170 Blocks: 4 IO Block: 2560 regular file
Device: 2d50005h/47513605d Inode: 1621536 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2428/ UNKNOWN) Gid: ( 2000/ UNKNOWN)
File: `2.txt'
Size: 2146 Blocks: 3 IO Block: 2560 regular file
Device: 2d50005h/47513605d Inode: 7975730 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 2428/ UNKNOWN) Gid: ( 2000/ UNKNOWN)
They look very similar to me. Now when I try to access them from the client, I get
# cat 2.txt >/dev/null; echo $?
0
# cat 1.txt >/dev/null; echo $?
cat: 1.txt: Permission denied
1
How's that? They have identical permissions! I also snoop
-ed the NFS packets on the server side and there was no difference in communication (other than packet lengths, checksums, timestamps etc.), but one file returns
NFS: Access = read
and the other
NFS: Access =
How can this be and what am I doing wrong?
EDIT1
# zfs get all homes | sort
NAME PROPERTY VALUE SOURCE
homes aclinherit restricted default
homes aclmode groupmask default
homes atime on default
homes available 1.36T -
homes canmount on default
homes casesensitivity sensitive -
homes checksum on default
homes compression on inherited from homes
homes compressratio 1.57x -
homes copies 1 default
homes creation Mon Aug 17 18:53 2015 -
homes devices on default
homes exec on default
homes logbias latency default
homes mounted yes -
homes mountpoint /homes local
homes nbmand off default
homes normalization none -
homes primarycache all default
homes quota none default
homes readonly off inherited from homes
homes recordsize 128K default
homes referenced 800G -
homes refquota none default
homes refreservation none default
homes reservation none default
homes secondarycache all default
homes setuid on default
homes shareiscsi off default
homes sharenfs on inherited from homes
homes sharesmb off default
homes snapdir hidden default
homes type filesystem -
homes used 1.31T -
homes usedbychildren 0 -
homes usedbydataset 800G -
homes usedbyrefreservation 0 -
homes usedbysnapshots 544G -
homes utf8only off -
homes version 4 -
homes vscan off default
homes xattr on default
homes zoned off default
# zfs get all homes@backup_2016-01-21 | sort
NAME PROPERTY VALUE SOURCE
homes@backup_2016-01-21 casesensitivity sensitive -
homes@backup_2016-01-21 compressratio 1.53x -
homes@backup_2016-01-21 creation Thu Jan 21 0:00 2016 -
homes@backup_2016-01-21 defer_destroy off -
homes@backup_2016-01-21 devices on default
homes@backup_2016-01-21 exec on default
homes@backup_2016-01-21 nbmand off default
homes@backup_2016-01-21 normalization none -
homes@backup_2016-01-21 primarycache all default
homes@backup_2016-01-21 referenced 800G -
homes@backup_2016-01-21 secondarycache all default
homes@backup_2016-01-21 setuid on default
homes@backup_2016-01-21 shareiscsi off default
homes@backup_2016-01-21 type snapshot -
homes@backup_2016-01-21 used 0 -
homes@backup_2016-01-21 userrefs 0 -
homes@backup_2016-01-21 utf8only off -
homes@backup_2016-01-21 version 4 -
homes@backup_2016-01-21 xattr on default
EDIT2
# share
- /homes rw ""
0 Answers