0

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?

2 Answers 2

1

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

2
  • Thanks for the info. That's what I wanted to know. Looks like the workarounds are relatively painful. Too bad because I always forget where my log and config files are on a mac; tagging seems like it would have been a good way to keep them at hand. :(
    – MM.
    Commented Nov 18, 2013 at 15:53
  • Don't forget that log files tend to get cycled after a day or after reaching a certain size. So even if you tag it today it might be a different file tomorrow.
    – nohillside
    Commented Nov 18, 2013 at 16:29
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .