Rickard wrote:I think the second error has to do with the fact that SQLite tries to create a temporary table where it doesn't have permission to do so. Google the error message and I'm sure you'll find something.
thanks i solved it. actually at the time of writing i was just playing around with this, but now i really need this and im a bit more into web serving stuff.
in my current setup i have user htdocs which i use to upload things to the docroot. htdocs user is in www group, which also includes the www user which runs httpd.
the permissions are setted up like this:
chown -R htdocs:www /var/wwwhtdocs
chmod -R 0750 /var/www/htdocs
then i got the access error again. after googling and playing around with it, i realized how to do the thing.
in upload dir where punbb files are
mkdir db
chmod 0770 db
now run the installer, with db in db/test.db. it successfully creates the database. the problem is discucced here
this is most likely caused by the fact that some versions of SQLite attempt to create a temporary file in the current directory. If that fails, because Bacula does not have write permission on the current directory, then you may get this errr. The solution is to start Bacula in a current directory where it has write permission.
thats why the installer (which is ran by user www) needs that 0770 on db dir. anyway the explanation above does not completely apply to our case since punbb doesnt need write permission on the _current_ dir but on the one that will contain the db file.
after install completed, it warns me to fix permissions on cache and avatar, i solved it and all was fine.
chmod 0770 cache
after first run it created a few new files
chown -R htdocs:www cache
chmod 0760 cache/cache*
after these there still remained a problem: anyone could download the db file by going to http://hostname/upload/db/test.db, so i had to copy the .htaccess file from cache dir.
i hope this will help someone setting up punbb. of course you have a different setup so you have to modify these steps.
program versions in my setup:
OpenBSD 4.0-stable
OpenBSD httpd (Apache 1.3.29 fork)
php5-core-5.1.4p1-hardened
php5-sqlite-5.1.4-hardened
sqlite-2.8.17p1
Ricard, i suggest you to update the installer doc to inlude some notes about the required permissions to create a new sqlite db.