Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Apr 11, 2013 4:04 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
Hi!

I'm trying to get a chrooted PHP-FPM environment working with DNS resolving. This is all it needs, no need for mail or other things. It's a Debian 6 32-bit install.

I tried copying the following:

/lib/i386-linux-gnu/i686/cmov
-> /chroot/lib/i386-linux-gnu/i686/cmov
libdl-2.13.so libm-2.13.so libnsl-2.13.so libnss_compat-2.13.so libnss_files-2.13.so libnss_nis-2.13.so libresolv-2.13.so librt-2.13.so

Also copied created a dev/urandom and etc/nsswitch.conf and etc/resolv.conf

Still does not seem to be working. I did try copying the files in the cmov directory to /chroot/lib/ directly but this did not work either.

Are there any other files that I need?

Thanks!


Top
   
PostPosted: Wed Apr 17, 2013 10:02 am 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
Hi!

Got it working, for whoever may need this in the future, I now have the following files in the chrooted env:
/dev/urandom (command to create, mknod -m 644 dev/urandom c 1 9)
/etc/:
Code:
total 52K
drwxr-xr-x  2 root root 4.0K Apr 17 15:34 .
drwxr-xr-x 10 root root 4.0K Apr 17 15:46 ..
-rw-r--r--  1 root root    9 Apr 17 15:34 host.conf
-rw-r--r--  1 root root  351 Apr 17 14:15 hosts
-rw-r--r--  1 root root  26K Apr 17 15:27 ld.so.cache
-rw-r--r--  1 root root 2.6K Apr 17 15:33 locale.alias
-rw-r--r--  1 root root  127 Apr 17 14:15 resolv.conf


/lib/i386-linux-gnu/
Code:
total 36K
drwxr-xr-x 3 root root 4.0K Apr 17 15:28 .
drwxr-xr-x 3 root root 4.0K Apr 17 15:27 ..
drwxr-xr-x 3 root root 4.0K Apr 17 15:27 i686
-rw-r--r-- 1 root root  22K Apr 17 15:28 libnss_dns.so.2


/lib/i386-linux-gnu/i686/cmov/
Code:
total 32K
drwxr-xr-x 2 root root 4.0K Apr 17 15:29 .
drwxr-xr-x 3 root root 4.0K Apr 17 15:27 ..
-rw-r--r-- 1 root root  22K Apr 17 15:29 libnss_dns.so.2


/usr/share/locale/
Code:
total 12K
drwxr-xr-x 2 root root 4.0K Apr 17 15:33 .
drwxr-xr-x 3 root root 4.0K Apr 17 15:31 ..
-rw-r--r-- 1 root root 2.6K Apr 17 15:33 locale.alias


/var/lib/
Code:
total 68K
drwxr-xr-x 3 root root 4.0K Apr 17 13:30 .
drwxr-xr-x 3 root root 4.0K Apr 17 13:28 ..
drwx-wx-wt 2 root root  56K Apr 17 16:00 php5


I actually think the locale files aren't needed for the DNS, but it is for the specific application I run. Same with /var/lib/php5, so I haven't included the contents of that directory.


Hopefully it'll help someone in the future!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group