Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
![Reply](https://www.linuxquestions.org/questions/images/buttons/reply.gif) |
01-20-2014, 07:06 PM
|
#1
|
Member
Registered: Dec 2007
Posts: 59
Rep:
|
'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 07:08 PM.
|
|
|
01-20-2014, 07:33 PM
|
#2
|
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
|
Quote:
Originally Posted by RileyTheWiley
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.
--C
|
|
|
01-20-2014, 07:55 PM
|
#3
|
Member
Registered: Dec 2007
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by custangro
Looks like the "/home/public" directory isn't executable. You need to set the executable bit in order to list directories.
--C
|
That worked, but it baffles me. Why must the directory be marked executable to enumerate the files in it? Weird.
Thanks
|
|
|
All times are GMT -5. The time now is 06:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|