linux - How to change ubuntu to root? -


i new linux. when list files under folder 1, see below result

-rwxrwxrwx 1 root   root      920 jun  3 10:36 file1.xsd -rwxrwxrwx 1 root   root      920 jun  3 10:36 file2.xsd drwxrwxrwx 2 ubuntu ubuntu   4096 jun 12 11:10 temp -rwxrwxrwx 1 ubuntu ubuntu   1853 jun 19 11:07 file3.xsd 

for files(file1 , file2) root root written after permisionsbut file3 ubuntu ubuntu displayed.

what difference b/w ubuntu ubuntu , root root ?

how can change ubuntu ubuntu file 3 root root ?

the first "root" stands user name , second "root" stands group name. design, ubuntu uses "sudo" command run other commands "as root", , actual root user not used.

so means, every time use command sudo run command, being done root. that's reason 2 of files being owned root (and group root).

you can change ownership of file command chown:

chown root:root file3.xsd 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -