I recently transferred all my code to a production server and was trying to start my application as another user. I am using Debian and running as root. I entered the following command:
pserve production.ini --user=www-data --group=www-data start
This caused an import error: "No module named resource"
I thought I didn't install the necessary packages to run my application so I re downloaded everything again as root. It still didn't work. I'm thinking if this has to do with a permissions issue, www-data user doesn't have access to the modules in my virtual environment created by the root user.
However if I just run pserve production.ini start, I get no such errors. Can anybody help me?
Regards,
Mark Huang