What are reasons to run as root and what not to run as root?
Posted: 2016-12-22 21:31
Basically title
Code: Select all
/ You will be the victim of a bizarre \
\ joke. /
-------------------------------------
\
\
\ __---__
_- /--______
__--( / \ )XXXXXXXXXXX\v.
.-XXX( O O )XXXXXXXXXXXXXXX-
/XXX( U ) XXXXXXX\
/XXXXX( )--_ XXXXXXXXXXX\
/XXXXX/ ( O ) XXXXXX \XXXXX\
XXXXX/ / XXXXXX \__ \XXXXX
XXXXXX__/ XXXXXX \__---->
---___ XXX__/ XXXXXX \__ /
\- --__/ ___/\ XXXXXX / ___--/=
\-\ ___/ XXXXXX '--- XXXXXX
\-\/XXX\ XXXXXX /XXXXX
\XXXXXXXXX \ /XXXXX/
\XXXXXX > _/XXXXX/
\XXXXX--__/ __-- XXXX/
-XXXXXXXX--------------- XXXXXX-
\XXXXXXXXXXXXXXXXXXXXXXXXXX/
""VXXXXXXXXXXXXXXXXXXV""
$ fortune
Code: Select all
/ Your life would be very empty if you \
\ had nothing to regret. /
--------------------------------------
\ ,+*^^*+___+++_
\ ,*^^^^ )
\ _+* ^**+_
\ +^ _ _++*+_+++_, )
_+^^*+_ ( ,+*^ ^ \+_ )
{ ) ( ,( ,_+--+--, ^) ^\
{ (@) } f ,( ,+-^ __*_*_ ^^\_ ^\ )
{:;-/ (_+*-+^^^^^+*+*<_ _++_)_ ) ) /
( / ( ( ,___ ^*+_+* ) < < \
U _/ ) *--< ) ^\-----++__) ) ) )
( ) _(^)^^)) ) )\^^^^^))^*+/ / /
( / (_))_^)) ) ) ))^^^^^))^^^)__/ +^^
( ,/ (^))^)) ) ) ))^^^^^^^))^^) _)
*+__+* (_))^) ) ) ))^^^^^^))^^^^^)____*^
\ \_)^)_)) ))^^^^^^^^^^))^^^^)
(_ ^\__^^^^^^^^^^^^))^^^^^^^)
^\___ ^\__^^^^^^))^^^^^^^^)\\
^^^^^\uuu/^^\uuu/^^^^\^\^\^\^\^\^\^\
___) >____) >___ ^\_\_\_\_\_\_\)
^^^//\\_^^//\\_^ ^(\_\_\_\)
^^^ ^^ ^^^ ^
This is true, sometimes, I change the owner as well, and sometimes after I am done*Often all that is needed is setting proper permissions to avoid the need for elevated rights.
Code: Select all
man chmod
Code: Select all
man chown
Please elaborate. I don't log into my system as root, but if I need to I'll open up a root window in SpaceFM, for example.dasein wrote:3) Never run a GUI as root. Seriously.
Dasein is 100% right, but now the OP and others may be wondering,Dasein>
2) Don't go randomly changing permissions, even when someone suggests it.
AndME> This is true, sometimes, I change the owner as well, and sometimes after I am done I change it back, ..................
Everything depends on the situation at the time.
The key word here is " randomly ",by Segfault »Often all that is needed is setting proper permissions to avoid the need for elevated rights.
This is the best "rule of thumb",.......That is pretty much what I do,..... I do everythingby dasein » 1) Don't run anything as root unless absolutely necessary, and switch back to a regular user as soon as you're done doing whatever required root access in the first place.
Seriously, this is very true, the consequences of doing that are a realdasein wrote: 3) Never run a GUI as root. Seriously.
I don't know what "SpaceFM" is,.... so can not really elaborate on that.by MALsPa »but if I need to I'll open up a root window in SpaceFM, for example.
Code: Select all
$ apt-get -s install fortune
But ok, after reading everything, I decide yes, I do want to install it, or maybe$ apt-get -s install fortune
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree -------snip--- was very long----
Code: Select all
# apt-get install fortune
Yes, I would say that Midnight Commander is a GUI file manager, as is SpaceFM. And this is the type of situation that led me to question dasein's point #3. Using Synaptic to update the system is another example; I do that all the time. But I log in as a normal user and then get root access only if/when I need it. Are we saying that one should never do that (update the system using Synaptic)? Perhaps I misunderstood what dasein was trying to say, not sure. And, no, I am not so incompetent as to not be able to comprehend how to use CLI -- I use that all the time, too.GarryRicketson wrote: MC is a file manager, a GUI of sorts, if need be run as root,...but it is still
best to start it as a normal user, and then if and when it is absolutely necessary
open the file as 'root' or use 'sudo'.
1) First and foremost, running X as root is a serious security problem. Google has details.MALsPa wrote:Please elaborate. I don't log into my system as root, but if I need to I'll open up a root window in SpaceFM, for example.dasein wrote:3) Never run a GUI as root. Seriously.
No, we are not saying no one shoudl ever use synaptic,..If you start synaptic fromby MALsPa »Are we saying that one should never do that (update the system using Synaptic)? Perhaps I misunderstood what dasein was trying to say, not sure.
Well that is good, and just to clarify,.... I did not mean specificly you,.... but this is whatby MALsPa And, no, I am not so incompetent as to not be able to comprehend how to use CLI -- I use that all the time, too.
How do you start the GUI program?MALsPa wrote:Please elaborate. I don't log into my system as root, but if I need to I'll open up a root window in SpaceFM, for example.dasein wrote:3) Never run a GUI as root. Seriously.
Code: Select all
pkexec spacefm