Should I change ownership of files in /usr/local/share/locale?

2

I'm trying to install Homebrew, and brew doctor returns a lot of warnings, one of which is this:

Warning: Some directories in /usr/local/share/locale aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

[list of directories in /usr/local/share/locale]

/usr/local/share/locale contains directories which have mostly two-letter names (language name abbreviations?), each of which has a LC_MESSAGES directory that contains a gnupg.mo file.

Shouldn't things like localized strings be owned by root and not writable to normal users?


UPDATE: I'm going to set the group ownership to admin and do chmod g+w, which should make them writable for me. I still would like an answer as to what the best thing to do is.

Blacklight Shining

Posted 2012-08-13T04:46:36.917

Reputation: 2 127

Not necessarily. Some packages may be managed by an account created for that purpose. – None – 2012-08-13T05:19:42.693

Answers

2

Did you install these files? If so, then you know what they are for. You can probably delete them if you don't need them anymore.

Whatever, setting locale files to group writable is perfectly safe. A malicious script could in theory change the spanish translation of whatever tool it is that got installed there before Homebrew: not the end of the world.

Update: The best thing to do is to figure out whose files they are and then delete them and use brew to install whatever it is that you just deleted. Mixing /usr/local with brewed and unbrewed stuff is not a good idea unless you know what you are doing.

Max Howell

Posted 2012-08-13T04:46:36.917

Reputation: 587

I don't remember installing anything in a locale directory; it might just have been OS X. And a malicious script would have to be able to authenticate as a user in the admin group first. ;) – Blacklight Shining – 2012-08-14T13:44:58.387

OS X never installs anything in /usr/local. – Max Howell – 2012-08-14T14:31:29.533

Must have been gnupg (see my latest edit). – Blacklight Shining – 2012-08-14T14:36:28.530