jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] Run command as jailed user from script ran as root?


From: Harn_Hua Ng
Subject: [Jailkit-users] Run command as jailed user from script ran as root?
Date: Wed, 27 Apr 2011 21:49:09 -0700 (PDT)

Hi,

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 denied
/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!

Cheers,
- harnhua

reply via email to

[Prev in Thread] Current Thread [Next in Thread]