2

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

amin
  • 125

1 Answers1

0

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!

amin
  • 125