Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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:

override_dh_perms:

every this get sweeter with this line!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.