LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-10-2005, 08:56 PM   #1
erika_Dec2004
LQ Newbie
 
Registered: Dec 2004
Location: USA
Distribution: Mandrake 9.2
Posts: 4

Rep: Reputation: 0
Question Who should own files in /usr/local (and executables, libraries in general)?


Are there any conventions about setting up ownership and permissions on programs installed to /usr/local? For example, I have Firefox installed into /usr/local/firefox. Is there any disadvantage to setting ownership to a (the) regular user? Would there be any disadvantage to setting ownership to root?

I was able to run Firefox after assigning ownership of both the executable firefox, and the firefox libraries (*.so files), to the regular user. This can't work (I don't think?) on a multiuser system, though, so I wonder what the conventions are. I also wonder whether there are problems that I might not notice right away.

Thanks in advance.
--Erika
 
Old 01-10-2005, 09:10 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If for example a particular user owns /usr/local/firefox/firefox-bin, he can modify firefox-bin so that its trojaned, then when other users(or in the worst case root) executes it bad things can happen.
Normal users shouldn't own any system-wide binaries at all.
Firefox should be able to work with any user when it's files are owned as root with proper permissions set.
 
Old 01-10-2005, 09:11 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
The /usr/local directories are only writable by root. Unless a program or library has a special owner setup by the installation, the owner will be root. Nothing would be gained by changing it.
 
Old 01-10-2005, 09:12 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Hi, and welcome to LQ!


The "problem" isn't as much a problem of the
ownership (even though files in global locations
would typically be owned by root since normal
users don't have write-permissions to those direc-
tories) but rather of permissions ...
if the files (executables & libraries) are set to
u=rwx,go=rx and u=rw,go=r respectively the
normal user is (should be) able to run the app.


Cheers,
Tink
 
Old 01-10-2005, 11:52 PM   #5
erika_Dec2004
LQ Newbie
 
Registered: Dec 2004
Location: USA
Distribution: Mandrake 9.2
Posts: 4

Original Poster
Rep: Reputation: 0
Smile Thanks

Thanks

There are no other users on this PC, that I am aware of. So, I am indifferent to the program's owner for maintenance purposes. I can always switch to root. But, clearly it is important that any programs I run as the regular user not be able to modify themselves or other programs. So I'll keep installing things as root.

Incidentally, this problem came about when I downloaded and installed Firefox. Made the firefox directory user-owned to download the installer there, and just installed on the user account also. In the future I will download to user directory, the log in as root to install.

--Erika
 
Old 01-12-2005, 11:56 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You could 'su' to root instead. For KDE programs, there is kdesu.

The firefox installation was a bit goofy in my opinion. I changed the name of the directory from 'firefox-install' to 'firefox' in the installation program dialog. I also produced links to the 'firefox' and maybe the 'firefox.bin' files in the /usr/bin dir.

A previous installation of firefox installed much more smothly for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 09:30 PM
/usr vs /usr/local on linuxpackages.net merchtemeagle Slackware 4 10-18-2005 04:09 PM
installed libraries to new location, but libtool still thinks it's in /usr/local bobwall Linux - Software 3 12-01-2004 12:34 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 10:21 AM
Can't move program files to /usr/local/bin/ asburyguy Linux - Newbie 4 04-03-2004 12:53 PM


All times are GMT -5. The time now is 05:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration