Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Can I do this?

sudo chown -R myUsernName /usr/lib

I mean can I do this without worrying that my OS will be broken? Or permissions will be screwed up?

Here is the reason why I would like to do it

and here is why I don't and I came here to ask you guys:

share|improve this question
    
@The Evil Phoenix Sorry I misspelled chown, do you mean this for chmod or chown? –  Ádám Jul 19 '11 at 18:23
4  
A better question is why are you doing this? –  Marco Ceppi Jul 19 '11 at 18:30
2  
Concur with @Marco - this seems like a tremendously bad idea at /best/, with absolutely no potential benefit that springs to mind. –  Shadur Jul 19 '11 at 19:01

3 Answers 3

up vote 8 down vote accepted

Two things:

(1) There is absolutely no advantages for this. The files in /usr/lib are supposed to be owned by root/system, as MANY things on the system which are owned by root are dependent on them.

(2) This is also a very good way to break your system.-

Just to make a point, follow this general rule of thumb:
If in doubt, don't do it.

share|improve this answer

Given that sudo is /usr/bin/sudo normally, you won't be able to use it after you run that chown command: the sudo binary owner will be yourself, so you won't get root permissions when running it next time.

So don't do that.

share|improve this answer
    
This specific answer probably belongs on one of the linked questions... this question refers specifically to /usr/lib/ –  Thomas W. Dec 2 at 19:58

No.

If you don't completely understand the reasons for the permissions of the files on your system, don't change them.

Generally speaking, files outside your home directory or /tmp or designated directories for data should belong to system users, not to you.

Furthermore, you should not write under /usr, with the exception of /usr/local: this is reserved for your distribution or package manager. If you want to install a program system-wide, install it under /usr/local.

That installation script looks like it's trying to install in the wrong places. If it tries to copy things to /usr/lib, it's broken. Don't use it. Look for a package for your distribution, or for a better installation script, or better installation instructions. Again, if things end up in /usr/lib (as opposed to /usr/local/lib) without going through a package manager, the installation process is broken.

share|improve this answer
2  
@CIRK: Please note this, what Gilles is saying is true. Anything that tries to run an install to /usr (not /usr/local) NOT through your distributions package manger IS BROKEN. Changing the permissions on /usr WILL LIKEWISE BREAK YOUR SYSTEM. Don't do it. Worst case senario, download the script and edit it to change all the paths to something else before you run it. Best case, find a real package that installs in your user folder or /usr/local. –  Caleb Jul 19 '11 at 21:18

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.