Solved Changing effective owner on mounted NFS share

puppyboy

Member

Reaction score: 4
Messages: 50

I have a share on FreeBSD with files owned by a UID that does not match the same user on the server remotely accessing these files. Without changing permissions on the files themselves, how can I make it so the remote system sees these files as being owned by a different user?

To break it down very simply, here are the details of my setup:

FreeBSD is the server. Slackware Linux is the remote host.
FreeBSD has user Alice with UID 1001. Linux has user Alice with UID 1000.
FreeBSD has user Bob with UID 1002. Linux has user Bob with UID 1001

Files on FreeBSD are owned by UID 1001 (Alice).

When mounted on Linux, these files are owned by UID 1001 (Bob).

I need the files to continue to be owned by UID 1001 on FreeBSD, but when accessed on Linux, to appear to the host to be owned by UID 1000, and behave as such.

My /etc/exports is currently:
/data/shared -mapall=1000

It was suggested that I use the -mapall=uid option to accomplish this, but after restarting the services it does not appear to have changed anything on the remote system.

Is there anything I can do to accomplish my goal here?
 
OP
OP
puppyboy

puppyboy

Member

Reaction score: 4
Messages: 50

boo.

Instead I just changed the UIDs on the remote system to match. Thanks
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,553
Messages: 30,264

Yeah, that's usually the easiest to do (if you only have a handful of machines). Consider implementing a central user database using LDAP. That will make it easier to get all the accounts equal.
 
Top