0

On Linux system, how does one run a process as a different, unprivileged user (like how lighttpd is run by www-data in the default setup)?

I've been using su $user; $command & over ssh, but those processes get killed when I logout.

If it makes any difference, I'm using a default Ubuntu setup on EC2.

2 Answers 2

2
su $other_user -c 'nohup sleep 600 &'
1
  • Brilliant, I'll give that a shot. Nov 20, 2010 at 17:36
2
nohup $command  </dev/null >/dev/null 2>/dev/null &

or

command </dev/null >/dev/null 2>/dev/null  &; disown
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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