Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "You should probably `chown` them" mean?

I've just installed Homebrew. When I run brew doctor I get this

Warning: Some directories in /usr/local/share/man 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:      /usr/local/share/man/de 

What does "You should probably `chown' them" mean? Can someone explain what exactly Homebrew wants me to do?

like image 471
dB' Avatar asked Jun 20 '13 20:06

dB'


People also ask

What does chown mean?

The command chown /ˈtʃoʊn/, an abbreviation of change owner, is used on Unix and Unix-like operating systems to change the owner of file system files, directories. Unprivileged (regular) users who wish to change the group membership of a file that they own may use chgrp.

Why do we need chown?

chown (or “change owner”) dictates who owns a file. If you want to change what users can do with a file, you probably want chmod. If you want to change the owner of a file, you probably want chown.

What is chown permission?

The chown command allows you to change the user and/or group ownership of a given file, directory, or symbolic link. In Linux, all files are associated with an owner and a group and assigned with permission access rights for the file owner, the group members, and others.


2 Answers

Ok, so chown is the unix command to change the ownership of a file.

Homebrew is asking me to change the ownership of /usr/local/share/man/de so that Homebrew can write to it. Homebrew runs with the same permissions as I do, so making myself the file's owner should solve the problem.

Running the following fixes the problem:

sudo chown $(whoami) /usr/local/share/man/de 
like image 68
dB' Avatar answered Sep 29 '22 15:09

dB'


Check the owner and the permission rights:

ls -la /usr/local/share/man/ | grep de; ls -la /usr/local/share/man/de/ | grep man1 

Change it:

/usr/bin/sudo /usr/bin/chgrp admin /usr/local/share/man/de /usr/local/share/man/de/man1  /usr/bin/sudo /bin/chmod g+rwx /usr/local/share/man/de /usr/local/share/man/de/man1 

Now you can use brew without any problems ;-)

Your system is ready to brew. 
like image 29
matt Avatar answered Sep 29 '22 14:09

matt