Which means you are running in embedded mode and code will be running as special Apache user and not you.
So, when you claim that permissions on directory where database is correct, what does that mean? What is the user/group that Apache runs as? What do you get for 'ls -las' on directory where database is? Are all parent directories back up to root also readable by others? Unless you have made everything writable by everyone, or run both Apache and webpy server as the same user, it is unlikely to work. To be absolutely sure it isn't a database permissions problem, please answer the above with actual details. Am only pushing this as it is the most common cause of problems and your configuration doesn't show you running in daemon mode as yourself, which would be the preferred scenario. Graham On Mar 25, 6:56 pm, Thierry <[email protected]> wrote: > And for completness, here is my virtualhost apache config: > > <VirtualHost *:80> > ServerName aec.dev > ServerAliaswww.aec.dev > DocumentRoot /var/www/arc_en_ciel/htdocs/ > CustomLog /var/www/arc_en_ciel/log/access_log combined > ErrorLog /var/www/arc_en_ciel/log/error_log > > RewriteEngine on > RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) > RewriteRule .* - [F] > > include /etc/apache2/vhosts.d/expire > include /etc/apache2/vhosts.d/defRoot > > <Files base.py> > SetHandler wsgi-script > Options ExecCGI FollowSymLinks > </Files> > </VirtualHost> > > On Mar 25, 7:13 am, Thierry <[email protected]> wrote: > > > Thanks for the advices. > > But sadly, it's not that. > > The sqlite parent folder perms are ok. > > After that mail, I created a "log" table, and made the script write it > > something on the first page loading, and it appears. > > Only the sessions table stay empty. > > > Again, if run it from the webpy server, the sessions appears in the > > session table, and everything works. > > I'm stumbled... > > > On Mar 25, 4:19 am, Graham Dumpleton <[email protected]> > > wrote: > > > > On Mar 25, 2:11 pm, Brent Pedersen <[email protected]> wrote: > > > > > sqlite needs write permissions on the _directory_ > > > > where the sqlite database is located and (r/write permissions) > > > > on the file itself. > > > > > so after defining try: > > > > > assert os.path.exists(self.finalDb), "db doesnt exist" > > > > assert os.access(self.finalDB, os.W_OK), "cant write to db file" > > > > assert os.access(self.dbPath, os.W_OK), "cant write to db directory" > > > > > and see which on fails. then adjust permissions. > > > > However, don't just go making the directories world writable. You are > > > better off running mod_wsgi daemon mode and run your application as > > > distinct user from Apache user, perhaps even yourself, such that it > > > has same access rights as yourself and can use the directories without > > > having to make them world writable or make the directories owned by > > > Apache user. > > > > Also double check that your configuration isn't using a relative path > > > to stuff like the database. In Apache the current working directory > > > could be anything. > > > > Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
