Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I'm setting up a network of two Virtual Machines, one is running Fedora Core 4, the other OpenSolaris 2008.05. The network itself is working fine. It's not intended to ever be connected to the outside world, so security can be as low as possible.
I have to share a folder from Fedora to Solaris via NFS - Fedora being the Server and Solaris the client. I'm aware that NFS identifies users by UID, so my /etc/exports on the Fedora looks like this:
The idea is that all requests will be treated as coming from the Fedora user with UID 500, who is owner of /usr/mydir (not of all of the files inside though).
Now, on the Solaris machine I want the shared directory to be mounted by automount, so my file /etc/auto_master is:
The mounting itself seems to work ok, because when I run automount -v I get the message
automount: /usr/mymountpoint mounted
(or unmounted, on alternate runs, of course)
So the directory seems mounted, but I can't access it! When I try an ls /usr/mymountpoint I get a 'Permission denied'. I suspect that there is still a problem with the UID, but I thought I had it fixed by using the options mentioned above in my Fedora /etc/exports file.
And now comes the even weirder part:
I tried to mount it manually from the Solaris, by the command
mount fedorahost:/usr/mydir /usr/mymountpoint
and then it doesn't even mount, I get the message
nfs mount: mount: /usr/mymountpoint: not owner
but I am owner of the mountpoint! I changed ownership of the mountpoint from myuser to root and back, and it didn't make a difference.
If anyone has some ideas on this, I'd be really grateful! It's the first time I'm working with Solaris, so I might have missed something obvious.
I tried to track the problem down by removing any ambiguities about user IDs. I gave the same user ID (500) to a user with the same name on both machines.
This user has the same name, UID, GID and password on the Fedora and Solaris machines. He also owns the directory /usr/mydir and all its files on the Fedora host.
Nevertheless, I still can't access the mounted directory on the Solaris, no matter whether I am that user or root. Also, I still get the 'not owner' error when trying to mount the remote file system manually, although I am obviously the owner of both the remote directory and local mount point, with the same login name and UID.
Automount still seems to work, sort of. An interesting thing I observed is the fact that the mountpoint seems to change ownership upon mounting via automount. That is, if the remote directory is not mounted, the mountpoint looks like this in ls -l:
If I then do cd or ls to mymountpoint I get 'Permission denied', both when I'm myuser or root. I'm quite confused by now, and any help would be much appreciated!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.