Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Are programs run from chroot run as root?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Travers
Tux's lil' helper
Tux's lil' helper


Joined: 09 Oct 2004
Posts: 142

PostPosted: Tue Apr 05, 2005 10:11 pm    Post subject: Are programs run from chroot run as root? Reply with quote

So, I have a 32 bit partition on my amd64 system. I want to be able to chroot into it and run X apps. I know how to do this. The question is: will these apps be run as the root user by my native OS? The amd64 gaim is a bit busted for me, and ~x86 works nicely; I don't want to run it as root.
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Tue Apr 05, 2005 10:46 pm    Post subject: Reply with quote

Generally only the super user can do this (according to the chroot info page), so I think you would be stuck running everything in your chroot'ed Gentoo as root.
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2953
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Tue Apr 05, 2005 11:30 pm    Post subject: Reply with quote

agent_jdh wrote:
Generally only the super user can do this (according to the chroot info page), so I think you would be stuck running everything in your chroot'ed Gentoo as root.


only root can run chroot. But if the chroot environment has more users, you are able lo log in as one of them (su - username) and then you run like a normal user
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Travers
Tux's lil' helper
Tux's lil' helper


Joined: 09 Oct 2004
Posts: 142

PostPosted: Wed Apr 06, 2005 3:40 am    Post subject: Reply with quote

I wound up creating a group 'chroot' of which I put my user in. I used sudo to give chroot privs to the 'chroot' group. Then, I created a user in the chroot (and I made sure it had a distincitve UID.) Finally, I su'ed into the chroot user. Works like a charm. I don't suppose there is an easier, more transparent, way to do this? I mean, I've got scripts and all, but I'd like to have to only run one, rather than run one to get into the choot, and the other to get into my user and launch apps.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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