1

I know the first part of the output that ls command gives, lrwxrwxrwx, the privileges to read, write and execute.

$ ls -l /usr/bin/mvn
lrwxrwxrwx 1 root root 21 May 16 06:55 /usr/bin/mvn -> /etc/alternatives/mvn

What does the part after that mean? Apparently, the root root part doesn't mean only root user can run the command, because I manage to run it with a non-root user. What does the root root part mean?

JJJohn
  • 191
  • 9
  • 2
    Does this answer your question? [What does 'ls -la' do?](https://askubuntu.com/questions/517229/what-does-ls-la-do) – muru May 19 '21 at 10:23

1 Answers1

4

root root means that the file has owner root and group root. You can run the command as non root, because the permissions of the file are lrwxrwxrwx. the first rwx denotes that the owner of the file (user root) has read (r), write (w) and execute (x) permissions. The second part denotes the respective rights of the members of group root. The last three letters denote the rights of others. In your case others have also read, write and execute permissions. By the way, the l preceeding the file permissions part, means that the file is a symbolic link to another file.

Here you can find one of many articles on the internet providing a good overview.

Bruni
  • 10,180
  • 7
  • 55
  • 97