Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

Opinions?

share|improve this question

2 Answers 2

up vote 2 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

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
2  
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

 
discard

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.