Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #81  
Old 18th October 2006, 17:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

I'm not sure if the socket is in that output. Maybe it doesn't have the string "socket" in its name...
Anyway, let's assume the socket was /tmp/example.sock. Then you can chroot it like this:

Stop psybnc, then create a symbolic link:
Code:
ln -s /home/chroot/tmp/example.sock /tmp/example.sock
Then start psybnc. Now psybnc should work inside and outside the chroot jail.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Sponsored Links
  #82  
Old 28th January 2007, 22:42
Kanedo Kanedo is offline
Junior Member
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default I've fixed "/bin/bash: No such file or directory" on my CentOS 4.4 distro.

I had this same error "/bin/bash: No such file or dirctory" that many others on getting on this thread. The actual reason for this error isn't that /bin/bash is missing in your chrooted directory. It's a library dependency that /bin/bash is missing. Using the script in the how-to didn't resolve to copy all of the dependent libraries needed by /bin/bash to your chrooted directory. To find out which ones are missing, you start by doing a 'ldd /bin/bash';
Code:
> ldd /bin/bash
     libtermcap.so.2 => /lib/libtermcap.so.2
     libdl.so.2 => /lib/libdl.so.2
     libc.so.6 => /lib/tls/libc.so.6
     /lib/ld-linux.so.2
then you go down that list and see if they're in you chrooted dir.

Code:
> ls /home/chroot/lib/libtermcap.so.2
/home/chroot/lib/libtermcap.so.2

> ls /home/chroot/lib/libdl.so.2
/home/chroot/lib/libdl.so.2

> ls /home/chroot/lib/tls/libc.so.6
/home/chroot/lib/tls/libc.so.6

> ls /home/chroot/lib/lib/ld-linux.so.2
ls: /home/chroot/lib/lib/ld-linux.so.2: No such file or directory

As it turned out, I was missing "/lib/ld-linux.so.2" in my chrooted directory. Copying that to my chrooted dir fixed my problem. I've only tested this on a CentOS 4.4 installation, but this might work for others as well.

I hope this solves your problem

Last edited by Kanedo; 28th January 2007 at 23:26.
Reply With Quote
  #83  
Old 7th February 2007, 11:40
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

still having some issues regarding ruby and gem, here is what I am trying to do:

Quote:
gem install rmagick
Attempting local installation of 'rmagick'
Local gem file not found: rmagick*.gem
Attempting remote installation of 'rmagick'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /usr/lib/ruby/gems/1.8/cache/rmagick-1.15.2.gem
I want to allow the client to install a new gem - besides the fact that it does not work, would this be safe? If so, how can I allow this and get rid of the Permission denied error?

###edit###
partially solved this. as far as I found out, every page I found was only stating that imagemagick6 was required, but after instaling imagemagick6-dev gem install rmagick worked too :-)

Last edited by Ovidiu; 7th February 2007 at 12:20.
Reply With Quote
  #84  
Old 24th February 2007, 13:36
pootle pootle is offline
Junior Member
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Kanedo
I had this same error "/bin/bash: No such file or dirctory" that many others on getting on this thread. The actual reason for this error isn't that /bin/bash is missing in your chrooted directory. It's a library dependency that /bin/bash is missing. Using the script in the how-to didn't resolve to copy all of the dependent libraries needed by /bin/bash to your chrooted directory. To find out which ones are missing, you start by doing a 'ldd /bin/bash';
Code:
> ldd /bin/bash
     libtermcap.so.2 => /lib/libtermcap.so.2
     libdl.so.2 => /lib/libdl.so.2
     libc.so.6 => /lib/tls/libc.so.6
     /lib/ld-linux.so.2
then you go down that list and see if they're in you chrooted dir.

Code:
> ls /home/chroot/lib/libtermcap.so.2
/home/chroot/lib/libtermcap.so.2

> ls /home/chroot/lib/libdl.so.2
/home/chroot/lib/libdl.so.2

> ls /home/chroot/lib/tls/libc.so.6
/home/chroot/lib/tls/libc.so.6

> ls /home/chroot/lib/lib/ld-linux.so.2
ls: /home/chroot/lib/lib/ld-linux.so.2: No such file or directory

As it turned out, I was missing "/lib/ld-linux.so.2" in my chrooted directory. Copying that to my chrooted dir fixed my problem. I've only tested this on a CentOS 4.4 installation, but this might work for others as well.

I hope this solves your problem

I confirm this is the same problem on suse 10.2 my friend has been helping me set this up and I too ended up with /bin/bash errors. When we copied the /lib/ld-linux.so.2 file over it worked, it wasn't until we came back here we found this post !

So What script to we need to edit/patch to make sure this is copied over everytime a new user is created. I'd also like to add the bash.rc file as well so it looks nicer when logged in. I'm new to ISPConfig so I don't know which files need hacking up.

THanks pootle.

Last edited by pootle; 24th February 2007 at 13:39.
Reply With Quote
  #85  
Old 24th February 2007, 14:10
pootle pootle is offline
Junior Member
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

its ok i've found it..

its under ispconfig/scripts/shell/create_chroot_env.sh

so I can edit what I want in there.

I'm going to look if its possible to set up SCP and SFTP now to transfer data to the domains rather than use FTP as it gives the encryption security.

Is it worth doing this or do people believe proftp is secure enough?
Reply With Quote
  #86  
Old 24th February 2007, 14:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,788
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Quote:
Is it worth doing this or do people believe proftp is secure enough?
Most poeple prefer to use FTP because tools like dreamweaver does not support SCP. Also you can enable proftpd to use TLS which secures the connection with SSL.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #87  
Old 24th February 2007, 15:14
pootle pootle is offline
Junior Member
 
Join Date: Feb 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by till
Most poeple prefer to use FTP because tools like dreamweaver does not support SCP. Also you can enable proftpd to use TLS which secures the connection with SSL.
Ah I didn't know you could secure proftpd is there any tutorials on here that explain how to do that for ISPConfig using the certificates that have been generated.

I've got SFTP working under chroot jail now but it looks like that might be point less if i have proftpd running with the certificate.

Thanks for you reply till.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSe 9.3 64-bit apt-get question... Bailx HOWTO-Related Questions 9 27th January 2006 12:26
Debian Question AngelDrago Installation/Configuration 8 18th January 2006 07:05
RHEL 4 Howto g8rbait Suggest HOWTO 12 29th December 2005 22:36
Small question misterm Installation/Configuration 1 18th October 2005 14:07
Newbie question thedude General 2 15th August 2005 15:38


All times are GMT +2. The time now is 02:39.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.