Hi All, I am not able to access particular directory on client which is mounted using NFS.
client# ls -l /mnt/tmp ls: cannot access /mnt/tmp/del: Permission denied total 0 ?????????? ? ? ? ? ? del
I have following disk on server. server# ls -ld /disk12 drwxrwxr-- 3 root root 4096 2013-02-28 15:53 /disk12
Entry in /etc/exports on server. /disk12 172.21.123.219(rw,sync)
On client Entry in /etc/fstab 172.21.123.225:/disk12 /mnt/tmp nfs fsc,rsize=32768,wsize=40960,rw 0 0
If I used no_root_squash in /etc/exports on server I can access directory without problem. /disk12 172.21.123.219(rw,sync,no_root_squash)
What can be the problem ?
Hi Amit,
On Thu, 2013-02-28 at 17:39 +0800, Amit Karpe wrote:
If I used no_root_squash in /etc/exports on server I can access directory without problem. /disk12 172.21.123.219(rw,sync,no_root_squash)
What can be the problem ?
You have kind of answered your own question here. If you need root access to the files from the client, you will need the 'no_root_squash'. All that option does is honour your clients root user over the NFS share (not great for security but I don't know your set up details).
Other than that you'd have to manage the users on both systems, to be the same name/uid/gid etc.. and do everything as a non-root user (better for security).
Take a look at this link[0] and hopefully that should clear it all up.
Thanks, Michael
[0]http://www.troubleshooters.com/linux/nfs.htm#_If_it_mounts_but_cant_access
On Fri, Mar 1, 2013 at 2:35 AM, Michael E. Maher michael@maheronline.co.ukwrote:
Hi Amit,
On Thu, 2013-02-28 at 17:39 +0800, Amit Karpe wrote:
If I used no_root_squash in /etc/exports on server I can access directory without problem. /disk12 172.21.123.219(rw,sync,no_root_squash)
What can be the problem ?
You have kind of answered your own question here. If you need root access to the files from the client, you will need the 'no_root_squash'. All that option does is honour your clients root user over the NFS share (not great for security but I don't know your set up details).
Other than that you'd have to manage the users on both systems, to be the same name/uid/gid etc.. and do everything as a non-root user (better for security).
Take a look at this link[0] and hopefully that should clear it all up.
Thanks, Michael
[0] http://www.troubleshooters.com/linux/nfs.htm#_If_it_mounts_but_cant_access
Michael, In following situation if I access as root or non-root, I am facing same "Permission denied" error. So the problem is just not with root but all users.
client# ls -l /borneo4 ls: cannot access /borneo4/test-dir: Permission denied ?????????? ? ? ? ? ? test-dir client# su - eos client$ ls -lh /borneo4/ ls: cannot access /borneo4/test-dir: Permission denied total 0 ?????????? ? ? ? ? ? test-dir
And on server side I am ready change file permissions. By changing ownership of directory will solve this problem without using no_root_squash ?