0

Going through with permissions and understanding permissions, I understand thats the 3 is not part of the owner, group, other. I also know that 7 is the highest permission for those three sets, what is the 9 in the permissions set (3907)?

-rw-------. 1 root root 3907 Mar 4 08:34 sshd_config

Justin
  • 3
  • 1

2 Answers2

1

The 3907 in your ls -l output is not the permissions but the file size in bytes.

The permissions are the part -rw------ which in numeric representation would be 0600, meaning read and write permission for the owner (root) only.

Tilman Schmidt
  • 4,101
  • 12
  • 27
  • so then what are the permissions for the owner group other from that line after putting in the command "ls -l /etc/ssh/sshd_config" – Justin Jan 26 '22 at 19:13
  • As long as I am not crazy today r = 4 w = 2 x = 1 So 600 = rw- --- --- – mindlesstux Jan 26 '22 at 19:22
  • so with that, the command "ls -l /var/log/cro" is the same permissions written out as... -rw-------. 1 root root 3442 Mar 4 08:34 /var/log/cron the permissions would still be r+w for owner, none for group, none for other correct? – Justin Jan 26 '22 at 19:29
0

As Tilman stated the 3907 is file size. The permissions are shown as -rw-------.

This case rw- --- --- would be I believe 600 in permissions. Which would be file owner can read and write it. Groups and Other can not do anything.

You can read up a bit here, seems to be a nice little break down of it:

https://ss64.com/bash/chmod.html

mindlesstux
  • 208
  • 1
  • 2
  • 4
  • thank you that resource. sorry for the noob question. I am currently taking a course for Linux+ and doing a lab on a VM. I appreciate the help – Justin Jan 26 '22 at 19:35
  • No problem, we all have to start somewhere. Also you will continously learn stuff about stuff you thought you knew to. (chmod -c... might be useful and I did not know that was a thing) – mindlesstux Jan 26 '22 at 19:52