Hello.
I have a server exporting nfs files.
And I have a client that mounts this filesystem.
The question is: Is it possible to change nfs file permission remotely from the client?, for example:
client> chmod 700 /tmp/export/files
Printable View
Hello.
I have a server exporting nfs files.
And I have a client that mounts this filesystem.
The question is: Is it possible to change nfs file permission remotely from the client?, for example:
client> chmod 700 /tmp/export/files
With NFS, the mounted filesystem behaves exactly like any other filesystem mounted to your machine. So usually, yes you can change permissions of files, so long as you have write permissions to the directory containing the files.
There are some things that can prevent you from changing permissions. Run the command "mount | grep /tmp/export/files", this will show you how the "/tmp/export/files" filesystem has been mounted, and with what options.
- If the "ro" option is set, the whole filesystem will be read-only, so you cannot change anything.
- If the "nosuid" option is set, you cannot change the top two bits of a permission mode, e.g. "chmod 6700 /tmp/export/files/file.txt" will fail. However the bottom 10 permission bits are OK to change in this mode, so "chmod 700 /tmp/export/files/file.txt" is OK.
- If the "noexec" option exists, then you cannot change access mode of any files to set the executable bit. So "chmod a+x /tmp/export/files/file.txt" will silently fail.
- There are also some other more advanced security features which may prevent you from changing any files or directories, but usually these features are not enabled.
@ramin.honary: kudos for clear and simple explanation. +1 like from me!