LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-03-2005, 08:36 AM   #1
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 31
Chroot Services


Hello,

I was wondering how can you tell if a service is running in a chroot environment? Is there a simple command that you can run? If so, which command?

I realize that you can usually edit a conf file to tell a service to run in chroot "jail". However, is there a way that one can verify this?

Thanks in advance!

-X
 
Old 11-04-2005, 07:09 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"I was wondering how can you tell if a service is running in a chroot environment? Is there a simple command that you can run? If so, which command?"

Are you looking from within the chroot jail or from outside the chroot jail? I think that you can answer the question within the chroot jail by running the top command. External to the chroot jail, I don't know.

---------------------------
Steve Stites
 
Old 11-07-2005, 05:38 AM   #3
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
If possible, then just log in as the chrooted user: su - $user
 
Old 11-07-2005, 10:43 AM   #4
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Original Poster
Rep: Reputation: 31
pk21,

My chrooted user does not have an interactive login. So I don't think su - "user" will work.

jailbait,

I am trying to check the chroot jail from outside the jail "externally."

Thanks!
 
Old 11-08-2005, 09:19 AM   #5
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Original Poster
Rep: Reputation: 31
Moderator,

Do you think I should have you move this post to the general forum? Maybe this thread will get more views...that will lead to more answers!
 
Old 11-08-2005, 10:41 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
If your machine has procfs (/proc) , you can use (as root)
ls /proc/<pidofprocess>/root

if it is not point to / , then it is chrooted

Last edited by nx5000; 11-08-2005 at 10:42 AM.
 
Old 11-09-2005, 09:20 AM   #7
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Original Poster
Rep: Reputation: 31
Thanks for your help!!

:-)
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 10:30 AM
TightVNC Ver terminal Services.. also looking for terminal Services for linux 2782d4 Linux - Security 3 05-20-2004 02:30 AM
Cannot 'chroot' dtournas Linux - General 5 05-17-2004 03:34 AM
chroot XPediTioN Fedora 0 04-07-2004 06:34 PM
Chroot chamkila Linux - General 1 06-13-2003 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:08 AM.

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