What do characters like "drwx--xr-x" mean in the output of "ls"?

13,258

These show you the file permissions, as can bee seen in nearly any unix system represented this way. The first character tells you if it is a directory (marked as ‚d‘), then you continue in groups of three for read (‚r‘), write (‚w’) and execute (‚x’) permissions for the owning user, group and everyone else.

In your example, the second entry is no directory (first position is ´-´), the owning user, which is ‚login‘, has read write and execute permissions. The owning group is ‚wheel‘ and can only execute, however everyone can read.

As this is basic stuff, you can find plenty of information about file permissions on unix/linux/whatever on the net.

IMHO the Arch-Wiki has a good overview for beginners:

Arch Wiki - File permissions

Share:
13,258
mertajvaz
Author by

mertajvaz

Updated on June 04, 2022

Comments

  • mertajvaz
    mertajvaz almost 2 years

    Can someone explain to me what the drwx... lines mean? As I understood starting with d is directory and with - (dash) is a normal file. Can someone confirm and help me understand what files I should create? I am so sorry if this wastes your time but I really got stuck.

    the question part is in red rectangle

    • Charles Duffy
      Charles Duffy about 5 years
      Stack Overflow is only for questions about writing software, not using software or standard tools. This question should be at our sister site Unix & Linux or SuperUser
    • Benjamin W.
      Benjamin W. about 5 years
      See this question on Super User.
    • Adam
      Adam about 3 years
      I'm trying to write software - and this was what I was thinking
  • mertajvaz
    mertajvaz about 5 years
    Thank you so much!! I hope you have a great and blessed day!
  • Charles Duffy
    Charles Duffy about 5 years
    @dfuchs, in the future, note the section "Answer Well-Asked Questions" in stackoverflow.com/help/how-to-answer, and therein the bullet point regarding questions which "are not about programming as defined in the help center". Behind that link, note that "unique to software development" is ANDed into other conditions, making it necessary rather than sufficient.
  • dfuchs
    dfuchs about 5 years
    @Charles Duffy Thanks for pointing that out, I‘ll pay more attention itf