Search code examples
linuxfilecolorsls

Linux ls shows files with yellow background color


what does this yellow (orange on Ubuntu) background color mean in ls?

enter image description here

neoexpert@sonderbyte:/srv/thing$ ls -l
total 32
drwxrwsr-x 2 root developers 4096 Aug 25 12:30 branches
-rw-rw-r-- 1 root developers   66 Aug 25 12:30 config
-rw-rw-r-- 1 root developers   73 Aug 25 12:30 description
-rw-rw-r-- 1 root developers   23 Aug 25 12:30 HEAD
drwxrwsr-x 2 root developers 4096 Aug 25 14:00 hooks
drwxrwsr-x 2 root developers 4096 Aug 25 12:30 info
drwxrwsr-x 4 root developers 4096 Aug 25 12:30 objects
drwxrwsr-x 4 root developers 4096 Aug 25 12:30 refs
neoexpert@sonderbyte:/srv/thing$ 

Solution

  • Just try ls -l to find out (this is faster than asking here).

    Read ls(1) and look at your LS_COLORS environment variable using echo $LS_COLORS

    (looks like you have suspicious sticky bit on plain files; see also this; try also stat(1) on the strange files....)

    Don't use sticky bit on files (only on directories).

    BTW, I suspect that setting sticky bit for git is a mistake.