Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a package so when users login through ssh they are forwarded to a chroot jail.

The jail directory is created via makejail program on building process.

But when the jail package copy on system it fails to chroot to that directory. getting this message:

chroot: failed to run command `/bin/bash': Permission denied

share|improve this question
up vote 0 down vote accepted

I found the answer. makejail program preserve permissions so there is no problem with jail directory created by makejail.

But deb helper scripts disturb every thing. on a default debian/rules file dh_fixperms run and change permissions so /bin/bash is not executable any more! to fix this problem we should overwrite dh_perms with this rule:


every this get sweeter with this line!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .