sshfs - user and group permissions

Smoot Carl-Mitchell smoot at tic.com
Sat Jan 1 19:54:03 UTC 2011


On Sat, 2011-01-01 at 18:48 +0000, David Fletcher wrote:

> The user ID numbers (the ones that start at 1000 on Ubuntu) of which
> there are only 3 or 4, on the server have ended up not being the same as
> the numbers on the desktops and the laptop. By coincidence mine is the
> same but not my son's.

Easiest fix is to get the uid and gid numbers to be the same on all the
systems.  You can use the usermod command to do this:

sudo usermod -u 1002 ted

This will change user ted's uid number to 1002.  The command will change
the ownership of all the files in ted's home directory to use the new
uid number.

You will also need to change the primary gid number as well:

sudo groupmod -g 1002 ted

At this point the files in /home/ted will still have the old gid number.
Change them by running:

sudo chgrp -R ted /home/ted

Make sure user ted is logged out when you do this, otherwise any of
ted's login sessions will not have the correct uid number of gid number
for access permissions.

See the usermod and the groupmod manual pages for the details.

-- 
Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot at tic.com





More information about the ubuntu-users mailing list