Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-13-2005, 03:29 PM   #1
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Question Call external prog from withing chroot jail

Hi all

Is it possible to call a process from outside a chroot jail eg. run a command as root in the real /bin, or is it completely limited to the jail?. Could this be done using sticky bits?
I want to mount a drive when in as a user in a chroot environment and to do this I need to run it as root - can anyone think of a way to do it...safely

Thang yaw
Old 12-13-2005, 04:12 PM   #2
Senior Member
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
So why use the chroot then? By definition you will only be able to run programs in the chroot. You can try putting a static version of mount in the chroot (or DL version with the appropriate libraries, see ldd). Now in your fstab (must also be in the chroot) set it with "user" option, and a regular user will be able to mount it.

Really though, what you are asking for defeats the purpose of the chroot. Perhaps if you give us the big picture of what your up to, you could get some more ideas of how to accomplish it.
Old 12-13-2005, 04:38 PM   #3
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Original Poster
Rep: Reputation: 30
Thanks bulliver

Yep I guessed about being able to add the lot inside the chroot.
The user can ssh to the jail but only to a limited shell with 1 available command (rsync) - what I wanted is to have an encrypted directory setup with dm-crypt. A command could be passed via ssh to mount the drive (with key), then rsync to it, then unmount it.
Don't think what I need is possible......any enlightenment appreciated


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot jail Gimpy Linux - Software 10 05-07-2010 01:30 PM
Chroot jail pachanga Linux - General 12 09-26-2008 05:15 AM
Jail and chroot rogk Linux - Security 2 10-16-2005 02:20 AM
chroot jail etc. f1uke Linux - Security 5 08-24-2005 03:12 AM
chroot jail simon Linux - Security 3 08-05-2001 08:21 PM > Forums > Linux Forums > Linux - General

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration