I am new to jailkit, having just installed and configured with some success.
Things look good so far.
I'd like to run a command in the jail as the jailed user, from a script that is run by root outside of the jail.
Normally I think this can be achieved by "su - jaileduser -c "path/to/script/inside/jail"
but I think there are problems with this approach:
i) using su is bad?
ii) I get the following output:
su: warning: cannot change directory to /path/to/script/inside/jail: Permission
/bin/bash: /path/to/script/inside/jail: Permission denied
Is there an easier way to accomplish this?
Or should I do something like setting up ssh within the jail and ssh using the jailuser's identity into localhost to run
the jaileduser's script?
Thank you for any advice / ideas!