1

Under Redhat, if I export a folder as an NFS mount, does the folder have to have RW for users/groups/others? Right now /storage/software is -rwxr-xr-x root/root

i.e. /etc/exportfs

/storage/software *(rw,sync)

On my client, I can mount but I can't write. I'm using a regular user and NOT root. I think "no_root_squash" fixes it but I really don't want that. Then again, nor do I want to have to chmod 777 the folder on the server.

2 Answers 2

3

NFS uses the filesystem permissions across systems.

A reasonable solution would to use a group that all users were members of and set the SGID bit on the directory as well. Public writable is for /tmp. If you must, at least set the sticky bit.

2
  • then it looks like I'll have to chmod 777 the folder then. It's just a folder for the developers to store all their files.
    – sdot257
    Apr 12, 2010 at 14:31
  • 1
    The guy just provided you the solution NOT to do chmod 777. You have to use a group that has writable access on your shared folder. Just create a group on all servers make sure it has the same ID and then SGID it: find /foldername/ -type d -print0|xargs -0 chmod g+rwxs;chmod -R u+rw,g+rw,o-w /foldername/;chgrp -R newgroup /foldername/ Apr 12, 2010 at 14:53
2

You should have the same user IDs and group IDs on both servers. At least those that will use the NFS folder.

3
  • Not gonna happen. My users can mount from their workstations or from servers.
    – sdot257
    Apr 12, 2010 at 14:31
  • 3
    @luckytaxi: This is why planning network security is so important. I highly recommend conisdering retooling your network before the company grows more, and the problems become much worse. I do understand what this is asking; but it's pain now, or more later.
    – Chris S
    Apr 12, 2010 at 14:46
  • 1
    For NFS to work well on a network, you need some form of centralised UID management (LDAP, NIS, rsyncd /etc/passwd), and ideally very controlled access to root accounts.
    – xenny
    Apr 12, 2010 at 17:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .