I want to fix permissions on another disk with chown. Set the permissions to a user which does not exist on the system which is currently running.
Does that work without adding the user?
I want to fix permissions on another disk with chown. Set the permissions to a user which does not exist on the system which is currently running.
Does that work without adding the user?
Use the numerical UID/GID instead of the user/group name.
You can find the UID/GID on the system the disk belongs to by using
id some_username
or
ls -ln some_file
where some_file
is a file that belongs to user you are looking for
Assuming the Group ID is 100
, you can now recursively set ownership of a directory to this group ID like this:
sudo chown -R :group_id path/to/dir
# in this case:
sudo chown -R :100 path/to/dir