Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why to unpack as user and not as root?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Saturation
n00b
n00b


Joined: 29 Mar 2004
Posts: 65

PostPosted: Wed Sep 01, 2004 11:00 am    Post subject: Why to unpack as user and not as root? Reply with quote

I like to know why people recommend to unpack tarballs as user instead of unpacking them as root.

I am also wondering if I should unpack the kernel tarball from kernel.org as user or as root.

So what is the advantage and what user should I be when I am going to unpack the kernel tarball?

Thanks
_________________
EVERYTHING you need to know to SECURE Linux
Back to top
View user's profile Send private message
toddg
n00b
n00b


Joined: 08 Apr 2003
Posts: 11
Location: Harrisburg PA

PostPosted: Wed Sep 01, 2004 11:37 am    Post subject: Reply with quote

If you unpack a tarball as root, most of the time everything in the tarball has root permissions, so you'd have to chmod things so they could be run as a regular user. Not untarring them as root also encourages good security practice of not running things as root --- particularly questionable binaries. In fact, I tend to compile things as a regular user and only make install as root.

As for the kernel question... it doesn't matter too much, but I would stick with untarring as a regular user and doing everything but the actual bzImage install/modules install as a regular user.

hope that helps.
Back to top
View user's profile Send private message
Saturation
n00b
n00b


Joined: 29 Mar 2004
Posts: 65

PostPosted: Wed Sep 01, 2004 1:56 pm    Post subject: Reply with quote

Thanks for the info toddg.

I have one more question. I am setting up a server and I have some packages that I am going to compile, but I don't want that an hacker sees the directories of these packages in my home directory when he get's access to the user account.
So I am thinking of creating them in a directory a normal user can't access. What would be the most secure? Should I unpack them in my home directory as a normal user whereafter I copy them to that unaccessible directory, or should I unpack them in that unaccessible directory as root?
_________________
EVERYTHING you need to know to SECURE Linux
Back to top
View user's profile Send private message
Saturation
n00b
n00b


Joined: 29 Mar 2004
Posts: 65

PostPosted: Wed Sep 01, 2004 9:00 pm    Post subject: Reply with quote

Please?
_________________
EVERYTHING you need to know to SECURE Linux
Back to top
View user's profile Send private message
PowerFactor
Veteran
Veteran


Joined: 30 Jan 2003
Posts: 1693
Location: out of it

PostPosted: Wed Sep 01, 2004 11:16 pm    Post subject: Reply with quote

Well, I would unpack and compile as the normal user. Then after instalation delete the source tree or move it to the non-user-accessible location.

Though if a cracker manages to gain access to your user account you arent going to stop him from seeing what you've installed just by getting rid of the source trees.
Back to top
View user's profile Send private message
Saturation
n00b
n00b


Joined: 29 Mar 2004
Posts: 65

PostPosted: Thu Sep 02, 2004 4:03 am    Post subject: Reply with quote

Thanks PowerFactor.
_________________
EVERYTHING you need to know to SECURE Linux
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum