3

I am using portia (https://github.com/scrapinghub/portia) and I have set the following command in my rc.local:

cd /home/portia/portia/slyd && twistd slyd

Problem here is that the command/script get executed as root and all the files/folders that are created by the script have "root" as owner.

How can I run this specific command as a different user?

What I have tried so far:

cd /home/portia/portia/slyd && su jim -c twistd slyd
cd /home/portia/portia/slyd && su jim -c "twistd slyd"
su jim -c "cd /home/portia/portia/slyd && twistd slyd"

Nothing worked.

I am running Ubuntu 12.04 LTS Server.

Thank you!

jimbo
  • 131

0 Answers0