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.
- Change the bash color setting: refer to the Reference 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
- Gnome-terminal syntax highlighting - green highlight?
- NTFS directory coloring in terminal
- Wikipedia: File system permissions
- Wikipedia: Sticky_bit
- How to chmod 755 all directories but no file (recursively)
--EOF--
I spend hours tinkering with LS_COLORS without success. Thanks for pointing that the issue was the permissions!!
ReplyDeletethank you it was so helpful
ReplyDeleteYes! Thankyou!!
ReplyDelete