Ubuntu – Is the user 999 safe

directorypermissions

I have no idea of how the user got changed to 999 or if it is safe.

A folder in my system is showing the user as 999 and the other files and folders inside that folder have the root permission. I tried to change the folders permission to root using chown but it does not work. Please let me know how to change the folder's permission to root. The folder is not a system folder, it is more of a backup folder.

root@Gamers:~# chown -hR root /folder/name
root@Gamers:~# ls
drwsr-xr-x 4  999    1M Feb 25 21:25 /folder/name 
root@Gamers:~# grep '^\w*:\w*:999' /etc/passwd
root@Gamers:-#

Best Answer

To change the owner and group of a file/directory (non-recursively) to root, you simply type

sudo chown root:root /PATH/TO/FILE_OR_DIRECTORY

Note that chown must be run with root privileges (therefore the use of sudo).


Whether it is a good idea in your case to change the owner of that directory to root or not (or something else) depends on what its purpose is and who user 999 is, if it exists.

Some light on this question could be shed by the output of

grep '^\w*:\w*:999' /etc/passwd
Related Question