Ls colors: why are some of the fonts black and others green in ls output

colorsexecutablefilesls

I uploaded some font files to AWS (running Amazon Linux) and moved them to the /usr/share/fonts directory using a cp command in .ebextensions.

When I SSH in from my mac and use ls -a, I see some files are colored differently – one set of font files is black while others are green. I'm curious what caused this to be so, and if it will create any problems for my code.

fonts directory on Elastic Beanstalk running AWS Linux

ls -la screenshot

From another answer on AskUbuntu I found this key on how to interpret these colours. I can't understand why a .ttf would be executable or why one set of .ttfs would be recognized and not another.

Blue: Directory

Green: Executable or recognized data file

Sky Blue: Linked file

Yellow with black background: Device

Pink: Graphic image file

Red: Archive file

These files were all downloaded to a mac from various font sites before uploading.

Best Answer

ls -l will tell you definitively whether a file is executable or not. I don't think there's any great mystery here. You downloaded files from various sources each of which might have had different permission bits set for one reason or another. * If you don't like seeing some with colors and others without try chmod -x *.ttf...font files should not need the executable bit set.

* As Matteo Italia's highly upvoted comment, which should be preserved, says: Most probably they were copied from a FAT or NTFS volume, which don't store the executable bit, so are mounted by default so that all files have the executable bit set.

Related Question