Question

In OS X X.9 Mavericks, I'd like to add a colored tag to my apache config file, which is under /private/etc/apache2, and to my apache log files, which are under /priavte/var/log

I do not have the option to add a colored tag to these files.

Is it because they are "hidden"? Or does it have to do with file ownership? Is there a workaround?

Was it helpful?

Solution

The files are owned by root and Finder runs as the user, so Finder is not allowed to modify the tags.

As a workaround, you can run Finder as root:

sudo /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder

Or use tag or xattr:

brew install tag;sudo tag -s $'Red\n6' /etc/apache2/httpd.conf

sudo xattr -w com.apple.metadata:_kMDItemUserTags '("Red\n6")' /etc/apache2/httpd.conf;sudo xattr -wx com.apple.FinderInfo '00 00 00 00 00 00 00 00 00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' /etc/apache2/httpd.conf

OTHER TIPS

Lri answers my "why" question so I'll keep it as the accepted answer. But here is another workaround that seems to do the trick:

  1. Find the config or log files in Finder
  2. Right-click and choose Make Alias
  3. Tag the alias with your colored tag
  4. (?) I don't understand this step, but I had to move some of the aliases out of the restricted folder before they'd show up in the "tags" filter.
Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top