LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-07-2003, 01:02 AM   #1
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Rep: Reputation: 30
Can't access mounted NFS directory: "permission denied"


My problem is when I try to access the mounted NFS directory using "ls" or "cd" or "dir", I get the error message, "permission denied".

I have gone through the usual simple procedure for exporting and mounting NFS shares. The NFS file seems to be mounted OK and the directories seem to be exported OK. They are in the /etc/exports file as "host address"(rw) and all the references I've suggest that this is all that is necessary. I thought it might be a user issue, but I created a user in the client with the same password and name as the exported file system, but that doesn't work either. I tried "no_root_squash" for an export and I can't even get the file exported.

What is going on?
 
Old 03-07-2003, 01:16 AM   #2
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
Here is the /etc/exports file:

Code:
/home/UserA                               "host address 1"(rw)
/home                                      "host address 1"(rw)
Here is the mount command I am using:

Code:
mount -t nfs -o defaults "host address 1":/home/UserA /home
I've also tried the mount with no options. "host address 1" is replaced with numeric addresses. I've also tried other mount points.

Last edited by SparceMatrix; 03-07-2003 at 01:17 AM.
 
Old 03-07-2003, 07:08 PM   #3
joeljensen
LQ Newbie
 
Registered: Jul 2002
Posts: 20

Rep: Reputation: 0
Double check the group and everyone permissions on the exported directory.

My /etc/exports file is
/export *(rw,no_root_squash)


Hope this helps
 
Old 03-08-2003, 12:58 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
What are the actual permissions of the files, that could be a factor in some cases?
 
Old 03-08-2003, 11:10 AM   #5
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
I am sure I have found the problem.

When you mount an exported file, it is still owned by some user on the exporting machine and you must have the access privileges to access the directory and files. Access permission goes by UID, not user name or password. So even if you create a user with the same user name and password as the owner of the exported file on the importing host, you will not get permission until the UIDs are the same. In fact, I'll guess that different user names and passwords with the same UID can share files and directories accross an NFS share.

You know, I looked in no less then three Linux Administrators books and only one had this information and it was not in the part on NFS. Strangely enough, the information was actually in a Linux Documentation Project How-To which is a very spotty source of reliable information. Linux documentation is very poor.
 
Old 03-08-2003, 12:16 PM   #6
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally posted by SparceMatrix

When you mount an exported file, it is still owned by some user on the exporting machine and you must have the access privileges to access the directory and files.
If memory serves, the access to the files by the remote system is done via some anonymous user ID. You can control this UID/GID in the exports file. If you add this user to the group that owns the files, you should be able to access the files from the remote system. You should be careful when you do this, though, especially if you allow rw access.
 
Old 03-08-2003, 01:36 PM   #7
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Original Poster
Rep: Reputation: 30
Quote:
If memory serves, the access to the files by the remote system is done via some anonymous user ID.
If my memory serves, not by default. Access defaults to "nobody", that is, "permission denied" which is what I was getting. Creating an anonymous user ID is an option and the files owned by such a user can be configured in /etc/exports.

Which reminds me. Does anyone have any experience with the Red Hat NFS Configure GUI tool? I was using mine and had some problems with it and now it does not start up anymore when I click its icon. Basically what happened was I looked at the exports file it was creating and found that it was not adding options to both the host addresses I included for permission.

As an example, I had from the Red Had configure tool,

Code:
"host address1" "host address 2"(rw, sync, no_root_squash)
I edited it so that it was,

Code:
"host address1"(rw, sync, no_root_squash) "host address 2"(rw, sync, no_root_squash)
And now the GUI tool will not come up even after changing it back.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 04:50 AM
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
NFS "permission denied" slithy Linux - Networking 2 06-29-2005 01:42 PM
"permission denied" when I try to send raw data to the sound device. Travis86 Linux - Hardware 2 10-29-2003 09:08 AM
permission denied when mounting nfs directory keirobyn Linux - Networking 3 01-29-2002 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:06 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