LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-02-2003, 12:59 AM   #1
MRK
Member
 
Registered: Jan 2002
Posts: 60

Rep: Reputation: 15
Compiling as root?


I've read many howto's and threads that state that you should configure and compile as a non-root user. Then to install, su to root and install. Why should i do this? I have ben configuring and compiling as root for a while and have had no problems? Thanks for the help!

-Mr.K
 
Old 07-02-2003, 01:35 AM   #2
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
well... it's all about security, I'm not sure, but in Linux philosophy, you should NEVER do ANYTHING at root, except things you are FORCED to do. So, since you can "configure" and "make" at user but need to be root to "make install" you should only be root to do make install. I suppose this way, you can avoid bad code, evil configure script or things like this.
 
Old 07-02-2003, 05:55 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,949

Rep: Reputation: Disabled
I should think that you are the owner, when you compile something -> the program inherits your rights and not root rights, which might be more secure if your machine is (ever) attacked. That right, security folks?
 
Old 07-02-2003, 10:28 AM   #4
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
hum, no you're wrong there, since every progs should be protected against users, they should be "make installed" at root so there right will (habitually) be rwxr-xr-x (755) and owned by root:root, so no one will be able to mess with the progs, except root. Installing progs as users can result in disaster, since anyone can play in the progs executable and add an evil code.
 
Old 07-02-2003, 11:03 AM   #5
Allen614
Member
 
Registered: Dec 2002
Location: Plains
Distribution: Slackware 13
Posts: 465

Rep: Reputation: 30
Yep,I do it all the time and Yep it does cause ownership problems at times. I don't think running a root terminal is that big a deal as long as you're not logged onto your system as root.
 
Old 07-03-2003, 04:37 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,949

Rep: Reputation: Disabled
Thanks for clearing up my misconceptions with a good explanation, Half_Elf and Allen 614. It's always fun to learn, and a good place to do so at LQ.

 
  


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
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 06:03 AM
After compiling Kernel 2.6.7 when I boot the image it sez it cannot mount root fs gibiman Linux - Software 2 08-07-2004 07:23 AM
Compiling in ACPI support on Compaq 2135CA (system crashes while compiling) Dag Linux - Laptop and Netbook 20 07-30-2004 08:56 PM
Compiling java files from root crash75uk Linux - Newbie 2 06-27-2004 04:21 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM


All times are GMT -5. The time now is 04:00 PM.

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