'Permission denied' on client of nfs-mounted directory
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
'Permission denied' on client of nfs-mounted directory
I have two machines:
Fedora 20 server, 192.168.3.41
ucLinux client, 192.168.3.43.
Server is serving a directory by nfs, here is the /etc/exports in toto: /home/public 192.168.3.43/255.255.255.0 (rw)
/var/ftp/pub 192.168.3.43/255.255.255.0 (ro)
Seed directory with a file:
[root@localhost eric]# ls -la /home/public
total 12
drw-rw-rw-. 2 root root 4096 Jan 20 15:08 .
drwxr-xr-x. 4 root root 4096 Jan 17 14:13 ..
-rw-r--r-- 1 eric eric 2227 Jan 20 15:08 fil0.txt
Client does a mount: mount -o rw,nolock,rsize=1024 192.168.3.41:/home/public /mnt
Check the mount:
~ # mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
192.168.3.41:/home/public on /mnt type nfs (rw,relatime,vers=3,rsize=1024,wsize=32768,namlen=255,hard,nolock,proto=udp,port=65535,timeo=7,retra ns=3,sec=sys,mountport=65535,mountproto=,addr=192.168.3.41)
Now let's look at that directory on the client (from root dir):
~ # ls -la mnt
ls: mnt/fil0.txt: Permission denied
ls: mnt/..: Permission denied
ls: mnt/.: Permission denied
My /etc/hosts.allow and /etc/hosts.deny files are empty. SELinux has been disabled since before the last reboot.
What is happening?
Eric
Last edited by RileyTheWiley; 01-20-2014 at 06:08 PM.
I have two machines:
Fedora 20 server, 192.168.3.41
ucLinux client, 192.168.3.43.
Server is serving a directory by nfs, here is the /etc/exports in toto: /home/public 192.168.3.43/255.255.255.0 (rw)
/var/ftp/pub 192.168.3.43/255.255.255.0 (ro)
Seed directory with a file:
[root@localhost eric]# ls -la /home/public
total 12
drw-rw-rw-. 2 root root 4096 Jan 20 15:08 .
drwxr-xr-x. 4 root root 4096 Jan 17 14:13 ..
-rw-r--r-- 1 eric eric 2227 Jan 20 15:08 fil0.txt
Client does a mount: mount -o rw,nolock,rsize=1024 192.168.3.41:/home/public /mnt
Check the mount:
~ # mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
192.168.3.41:/home/public on /mnt type nfs (rw,relatime,vers=3,rsize=1024,wsize=32768,namlen=255,hard,nolock,proto=udp,port=65535,timeo=7,retra ns=3,sec=sys,mountport=65535,mountproto=,addr=192.168.3.41)
Now let's look at that directory on the client (from root dir):
~ # ls -la mnt
ls: mnt/fil0.txt: Permission denied
ls: mnt/..: Permission denied
ls: mnt/.: Permission denied
My /etc/hosts.allow and /etc/hosts.deny files are empty. SELinux has been disabled since before the last reboot.
What is happening?
Eric
Looks like the "/home/public" directory isn't executable. You need to set the executable bit in order to list directories.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.