Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I know what /usr/local is for - installing software for the local machine. By default, root owns the directory. This means that to install there, you need to use sudo. For a single-user or developer machine, this seems like unnecessary extra use of the command. Hence, my question - is it safe for me to own /usr/local?

For example, Homebrew for OS X "Just Works" because they own /usr/local and safely install their software there without the use of sudo.

Additionally, if you have locally compiled software installed to /usr/local, the software currently needs root to modify themselves or install plugins. This seems unsafe - I want to only use sudo when I know EXACTLY what will happen.


share|improve this question

2 Answers 2

up vote 5 down vote accepted

It is unusual that /usr/local isn't owned by root. But you can change the owner as you want.

But I advise to ensure that /usr/local/sbin is still owned by root to avoid a security problem. The commands here are usually invoked only by root.

share|improve this answer
I did an install of bower earlier, and the tutorial suggested doing chown -R $USER /usr/local so I am now running chown -R root /usr/local/sbin - are there any other folders in /usr/local that would be better off with root ownership? I should have checked all permissions before running command. Instant "regret upon return". –  OnethingSimple Feb 16 at 13:56

If sudo is such an inconvenience then just update /etc/sudoers so you don't have to enter your password when you run sudo. I believe that is a better solution than changing the owner of /usr/local.

share|improve this answer
Passwords aren't the issue - it's more the idea that to install modules to a program in /usr/local you have to use sudo, which is potentially dangerous. –  PR3x Feb 26 '13 at 3:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.