1752758 Members
5116 Online
108789 Solutions
New Discussion юеВ

/etc/exports problem

 
SOLVED
Go to solution
Mauro Livi
Valued Contributor

/etc/exports problem

Hi all,
This is driving me nuts. I have two directories on a server that I'm trying to access from another server by making the appropriate /etc/exports entries. My /etc/exports on server1 looks as follows:

/dir1 -access=server2
/dir2 -access=server2

I can access /dir1 just fine, but /dir2 never gets exported and cannot be accessed from server2. I tried unexporting (exportfs -ua) then reexporting (exportfs -a) with no success.
Permissions on the two directories are the same...I'm stumped because how in the world could one directory be accessible and the other not be? After all, they are on the same server.

Thanks in advance.
Mauro
11 REPLIES 11
Tim Nelson
Honored Contributor

Re: /etc/exports problem

post exportfs -va

post output when attempting to mount /dir2

Mauro Livi
Valued Contributor

Re: /etc/exports problem

Well I guess I mislead you. Sorry. They do export and the exportfs -va results displays as follows:

# exportfs -va
exported /u01
exported /u02

However, when I go into the remote server, I see ALL the files and directories of the /u01 directory, but only see very few contents of the /u02 directory. I need to access a directory under /u02 but I don't even see it from the remote server. Thought that would be permissions, but that's not it.

Thanks again.

Tim Nelson
Honored Contributor

Re: /etc/exports problem

The missing directories under /u02/, are they links or mountpoints ?
Mauro Livi
Valued Contributor

Re: /etc/exports problem

I don't specifically "mount" them. They're just directories under /u02 on the "host" server. /u01 has certain directories as well.
I simply export then entire /u01 and /u02 directories expecting to gain access to the entire structure under them from the remote server.

This is true for /u01, but I only see one directory under /u02 (there are more). Wonder what I am missing???

Mauro
Patrick Wallek
Honored Contributor

Re: /etc/exports problem

Does the user you are using to look at the NFS mounted file systems have permissions to see the other directories under /u02?

Compare the permissions of the directories under /u01 and /u02 on the source server.
Mauro Livi
Valued Contributor

Re: /etc/exports problem

Yeah, did all that...but will check again. I'm doing all of this as root and should have access to everything, but doesn't hurt to look again. This is strange.

Mauro
Patrick Wallek
Honored Contributor

Re: /etc/exports problem


Ahhh......root access can be a different issue entirely!

Try the following:

/dir1 -access=server2,root=server2
/dir2 -access=server2,root=server2

Re-export, then remount and see what things look like.
Mauro Livi
Valued Contributor

Re: /etc/exports problem

Didn't seem to help...same thing.

Thanks
Mauro
Bill Hassell
Honored Contributor
Solution

Re: /etc/exports problem

> but only see very few contents of the /u02 directory

So you mean that /u02 is actually mounted, correct? What does:

bdf /u02

show?

> expecting to gain access to the entire structure under them from the remote server...
> as root and should have access to everything,..

That is probably your difficulty. Being root on the client machine gives you *no* privileges at all to the /u02 directory. For NFS mounts, the local root user is "nobody", so only directories that have read and execute for the world will be visible. To give away root privileges to a client, the server must have -root=hostname as a mount option in /etc/exports, something like this:

/u01 -root=myhost,-access=myhost
/u02 -root=myhost,-access=myhost

Then rexport everything on the server with: exportfs -va and umount and then remount from the client (NFS remembers the old state).


Bill Hassell, sysadmin