Linux - GeneralThis 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
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.
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.
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.
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
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.
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,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.