You are not logged in.

#1 2013-04-09 01:50:44

Registered: 2012-03-30
Posts: 18

Replacing Samba with NFS

Long story short version:  How do I emulate the create mask and force user/group function from Samba in NFS?

I've only used Samba since I've only had Windows Clients and a single Linux server.  However I'm getting a second Linux server to toy with and I'd like to avoid running two different services for exporting a file system.  I'm running into a snag I can't work out with permissions though.

My ideal situation is that I've got a number of regular users, a "media" account, "media" group, and "admin" group.  The media account is mainly just a placeholder for all media files.  The "media" group is something every user is attached to so they can read (or write) all my media files.  The admin group is there for folders where I've put media files that I don't want everyone to have write access to, but do need at least one person able to modify.

My current setup on Samba:

/Media (Media files that everyone should be able to read but not modify/delete) - Set to Media:Admin, set to any file is owned by Media:Admin with 664 (or 775 for directories) permissions
/Public (Public; everyone should have write access stuff) - Set to Media:Media, set so that any file created is owned by Media:Media with 664 (or 775 for directories) permissions
/Home (Home Directories) - Owned by root with individual home directories owned by users as normal, no special Samba/umask stuff

How do I replicate that with NFS?  Setting up the mounts are easy, and I know I can force authenticated users to adopt a specific UID or GID in NFS, but I want them to retain their original permissions and simply have any files they create be set to that specific UID/GID and at a certain umask without changing the entire user umask.

Edit: I know I can put the sgid flag on a directory to resolve part of the problem, but I need the userid to be media for any file in the /Media mount rather than the user who put it there.  And I'm still stuck with the umask issue.

Last edited by Mykander (2013-04-09 02:00:47)


Board footer

Powered by FluxBB