LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   confused over nfs permissions (https://www.linuxquestions.org/questions/linux-newbie-8/confused-over-nfs-permissions-4175467292/)

ali.abry 06-25-2013 05:12 AM

confused over nfs permissions
 
Hi every body

I just setuped a simple nfs with this entry in exports file on debian 7 :
Code:

/var/www/test 172.16.134.1(rw)
and here is the permisson on /var/www/test file :

Code:

# stat /var/www/test/
  File: `/var/www/test/'
  Size: 4096              Blocks: 8          IO Block: 4096  directory
Device: fe00h/65024d        Inode: 131888      Links: 4
Access: (0705/drwx---r-x)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2013-06-25 04:34:13.684871311 -0400
Modify: 2013-06-25 04:28:34.852884273 -0400
Change: 2013-06-25 04:34:08.868883967 -0400
 Birth: -

but when i mount the nfs share on client system i don't have write permission but i set "rw" in exports file , shouldn't i have write permission ?
when i change permission on /var/www/test to 707 i have write permission , so whats the use of "rw" or "ro" in exports file ?

theNbomr 06-25-2013 08:48 AM

The exports file defines what permissions are granted to the NFS client(s). Granting write permission to clients cannot override the basic file permissions that are built into the server filesystem. OTOH, the NFS server can revoke permissions that might otherwise have been permissible at the filesystem level.
--- rod.

camorri 06-25-2013 08:54 AM

Quote:

when i change permission on /var/www/test to 707 i have write permission , so whats the use of "rw" or "ro" in exports file ?
This is working as designed. There are two tiers of read write permissions here. The owner of the directory has ultimate control. So, to get write permission, you need both set to allow writing.

Samba file sharing is the same. Think of the situation where the owner of some directory wants 'others' to be able to read files in this directory, but does not want them altered. Does the sys admin know that? Sys admins don't always know all the details about shares, so the owner has ultimate control.


All times are GMT -5. The time now is 09:48 AM.