1

I want to configure my .bash_profile and I've seen this post about BSD based ls configuration: https://www.cyberciti.biz/faq/apple-mac-osx-terminal-color-ls-output-option/

I just don't know what is the difference between first directory and the last two (directory) row, or between the executable (5th) row and the 8th and 9th row.

0

What you are comparing here is basically a "standard" entity (file/folder) with entities that have special permissions attached:

  • directory (first row), is just that. A directory (or folder) of other directories and/or files. These directories all have permissions on who can read/write/execute based on user/group associations.

    • directory writable by others with sticky bit set (10th row) means it's a directory to which users of other groups (than the owner/group) can write to but only the file owner or the root user can modify the file.

    • directory writable to others, without sticky (11th row) is also a directory that can be written to by others, but anyone can modify the file.

  • executable means that a file can by run by the owner or users in the group.

    • executable with setuid bit set (8th row) this is also an executable file, but when the file is run, it will execute with the file owners privileges, not the one running the file. For example, if a file is owned by root, but run by you, it will execute as if root ran it.

    • executable with setgid bit set (9th row) This is the same as above, except instead of the file's owner, it will be executed with the privileges of the group that owns it (i.e. wheel).

You can find more info on the LSCOLORS including a "color calculator" on the post https://apple.stackexchange.com/a/282189/119271

You must log in to answer this question.

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