PDA

View Full Version : NFS input mask


tornadof3
2008-05-17, 06:08 AM CDT
I have the /home directory of my server shared via NFS for all users on network.

In /home, there are each user's personal files, plus a /home/shared folder that is a shared resources area. Each user has a symlink in /home/username/shared_resources that seems to work well.

When a user saves a file to the shared resources area, it inherits their ownership and access privieges, hence is not readable to any other network client; how can this be fixed? Is it possible to have every file saved to that area have a certain user permissions?

savage
2008-05-19, 01:48 AM CDT
Not 100% but I think you want to look into the "Sticky Bit", from what I understand, newly created files will inherit the owner/group from the directory, instead of the creating user, then by setting permissions on that directory, other users can view/modify/delete the files based on the directory permissions.

I've not done this myself, so check it out, but I think that should point you in the right direction.

jithu
2008-05-19, 11:04 PM CDT
Hi Dude
It is 100% possible that u can make it work
You can use acl for the file permission and set the default permission of the shared resource to rwx.

1. you have to mount the partition with acl option in fstab
2. remount the /home directory
3. use setfacl to configure
eg:- # setfacl -d -m o:rwx /path/to/shared/resouces
# setfacl -d -R -m o:rwx /path/to/shared/resouces
This will generate a default permissions of rwx for all the users for newly created file

Have Fun!!!