[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permissions for an entire PARTITION



Synchronizing your user account's UID across all of your own local
operating system installations is probably easier than most of the
workarounds that have been suggested.  There may not even be any
work required -- if you've always just followed the defaults, then
your primary user account is probably UID 1000 on every system, and
you're done.

If one of the systems has your UID as something else, you can logout,
login as root, change the UID in /etc/passwd, then chown every file
that you owned to the new UID.  For example, using find:

cd /each/file/system/one/at/a/time
find . -xdev -user 500 -exec chown 1000 {} +
cd /the/next/file/system
find . -xdev -user 500 -exec chown 1000 {} +
etc.

(I would not recommend trying it as one gigantic find from / because
of the file systems like /sys and /proc, which should probably be
skipped.  It's easier to do it the way I showed.)

(If the user had any long-running jobs, they should be killed and
restarted under the new UID.  Logging out *probably* gets most of them
under most circumstances, but you never know.  When in doubt, reboot.)


Reply to: