LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling as root? (https://www.linuxquestions.org/questions/linux-software-2/compiling-as-root-69452/)

MRK 07-01-2003 11:59 PM

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

Half_Elf 07-02-2003 12:35 AM

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.

JZL240I-U 07-02-2003 04:55 AM

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?

Half_Elf 07-02-2003 09:28 AM

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.

Allen614 07-02-2003 10:03 AM

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.

JZL240I-U 07-03-2003 03:37 AM

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.

:)


All times are GMT -5. The time now is 07:09 AM.