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

Re: Permissions for an entire PARTITION



On Wed, 2016-10-26 at 08:28 -0400, Greg Wooledge wrote:
> 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.

Which the -xdev option you specify will do anyway...

There's still the issue of using find on other filesystems that may be
mounted (e.g. if there's more than one partition or disk normally
mounted). And then there's group ownerships to consider.

Definitely a good thing to try and not get into the situation of wanting
to change user id in the first place. E.g. by creating all users in the
same order (assuming the systems are all the same distro) which is what
I do as a early step after installing a new system.

-- 
Tixy



Reply to: