LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-20-2014, 06:06 PM   #1
RileyTheWiley
Member
 
Registered: Dec 2007
Posts: 59

Rep: Reputation: 15
'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.
 
Old 01-20-2014, 06:33 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by RileyTheWiley View Post
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
 
Old 01-20-2014, 06:55 PM   #3
RileyTheWiley
Member
 
Registered: Dec 2007
Posts: 59

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by custangro View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create lock files - permission denied on mounted filesystem (NFS) the_bigbalu Linux - Server 0 02-28-2012 06:09 AM
[SOLVED] cannot execute binary on directory mounted by nfs (Debian wheezy) Permission denied. kaz2100 Debian 4 02-16-2012 08:12 PM
cd to nfs mounted dir outputs permission denied ElectroLinux Linux - Newbie 2 05-21-2008 07:29 PM
NFS Woes: Client denied permission Swakoo Linux - Networking 3 03-13-2006 05:10 AM
Can't access mounted NFS directory: "permission denied" SparceMatrix Linux - General 6 03-08-2003 01:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration