LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 03-02-2006, 12:28 AM   #1
panicbox
LQ Newbie
 
Registered: Nov 2005
Location: Philippines
Distribution: Fedora Core 4, Debian
Posts: 21

Rep: Reputation: 15
Chrooted Postfix? How would I know?


How would I know that postfix is already running in a chroot jail? I already did this:

[root@mirage postfix]# ps -aux | grep postfix
root 10896 0.0 0.3 6636 1736 ? Ss 14:17 0:00 /usr/libexec/postfix/master
postfix 10898 0.0 0.3 6692 1744 ? S 14:17 0:00 pickup -l -t fifo -u -c
postfix 10899 0.0 0.3 6736 1776 ? S 14:17 0:00 qmgr -l -t fifo -u -c
root 10995 0.0 0.1 3756 688 pts/1 R+ 14:28 0:00 grep postfix

[root@mirage postfix]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 10.10.5.171 ESMTP Postfix
^]

telnet>


But it's running directory is /usr/libexec/postfix/master.
 
Old 03-03-2006, 08:45 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
To check if a process is chrooted, go to /proc/<its_pid>
and look the file root
if it points to / then its not chrooted, otherwise it should point to the chroot
 
Old 03-07-2006, 04:27 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Another way to check, if you can run a command in the chrooted account, would be to test the inode number of toplevel dirs:
in Sh/Bash:
Code:
[ "$(stat -c %i ".")" = "2" -o "$(stat -c %i "..")" = "2" ] && echo "Not chrooted"
 
  


Reply



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
What does chrooted mean? Red Squirrel Linux - Software 6 08-21-2005 08:41 PM
is service chrooted? overlord73 Linux - Security 2 07-06-2005 01:10 AM
cron for chrooted users metobln Linux - Software 4 04-24-2005 05:39 AM
Chrooted Apache dominant Linux - Security 4 09-20-2004 02:48 AM
about vsftp chrooted user... raymond Linux - General 5 08-18-2003 09:20 PM

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

All times are GMT -5. The time now is 07: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
Open Source Consulting | Domain Registration