Fork me on GitHub

4/03/2013

[Bash] Annoying directory green highlight in terminal

Recently, I found some directory become green highlighted in the background when I issue ls command as below picture.

After google that, it is due to the write permission of the others (as the red mark in the picture). There are 2 ways to fix this annoying coloring.

  1. Change the bash color setting: refer to the Reference 2
  2. Use the chmod to recover the directory permission to default 755, or use below command to recursively set all directory to default 755

    $ find . -type d -print0 | xargs -0 chmod 755 
    

Ref

  1. Gnome-terminal syntax highlighting - green highlight?
  2. NTFS directory coloring in terminal
  3. Wikipedia: File system permissions
  4. Wikipedia: Sticky_bit
  5. How to chmod 755 all directories but no file (recursively)

--EOF--

No comments:

Post a Comment