On 19 Jul 2012, at 2:42 PM, lyn2py wrote: > That's right, it works for now. Which file do I need to change?
It can be tricky playing with this stuff, so no guarantees... Here's what I'd try. In /etc/apache2/sites-available/default (which was set up by setup-web2py-ubuntu.sh), find this line: WSGIDaemonProcess web2py user=www-data group=www-data Change it to: WSGIDaemonProcess web2py user=ubuntu group=www-data ...or whatever user you want. Then in the parent of your web2py directory, do this $ sudo chown -R ubuntu web2py and finally restart Apache. So what you're doing is giving ownership of your web2py folder and everything in it to 'ubuntu' and telling Apache to run web2py as the 'ubuntu' user. I *think* that should solve your problem, but again, no guarantees. > > Thanks Jonathan! > > > On Thursday, July 19, 2012 11:20:49 PM UTC+8, Jonathan Lundell wrote: > On 19 Jul 2012, at 12:24 AM, lyn2py wrote: >> Example: >> /home/www-data/web2py/applications >> By tree's owner do you mean the owner of web2py folder or owner of www-data >> folder? > > I mean the web2py folder and its contents. > >> >> From what I see, www-data folder is root:root >> web2py folder is www-data:www-data > > And that works, right? Because the wsgi process (mod_wsgi and web2py) is > running as www-data. If you change the owner of those files, you probably > need to change the user that wsgi runs as, in its configuration file. > --