-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.

5
  • 1
    did you try man ls
    – JDS
    Feb 3, 2015 at 16:49
  • It's the group owner.
    – EEAA
    Feb 3, 2015 at 16:50
  • I strongly suggest reading the chmod man page ('man chmod').
    – Liczyrzepa
    Feb 3, 2015 at 17:02
  • 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.
    – user268538
    Feb 3, 2015 at 20:06
  • 1
    Read the man page; this is basic.
    – fukawi2
    Feb 4, 2015 at 0:10

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged .