-4

How do I turn on the labels for ls -l?

-rw------- 1 root     root             0 Jan  2  2014 php_logging.log

The first is permissions but root root confuses me. One is the username of the owner and the other is something else. I'm looking at a similar PHP log file that has root httpd, so I need to figure out what the second name is, so I can change that. It might be chgrp httpd.

  • 1
    did you try `man ls` – JDS Feb 03 '15 at 16:49
  • It's the group owner. – EEAA Feb 03 '15 at 16:50
  • I strongly suggest reading the chmod man page ('man chmod'). – Liczyrzepa Feb 03 '15 at 17:02
  • 1
    Read the man page; this is basic. – fukawi2 Feb 04 '15 at 00:10
  • The output you listed is as i expect from ls -l. permissions, owner,group,timestamp and filename. I dont know what you mean by headers or labels. You mentioned that another is owned by the httpd group, i would expect this as the php log is likely written by the apache user "httpd". Can you please provide further information...like what you are trying to achieve and where it is currently falling down. –  Feb 03 '15 at 20:06

1 Answers1

0

Second root in your example is a group ownership (to change it use chgrp). If you're looking to understand it better, get yourself familiar with chown, chgrp and chmod.

alexus
  • 13,112
  • 32
  • 117
  • 174