On 19 Nov 2009, at 8:05am, Artur Reilin wrote:

> My host have sqlite support vor sqlite 2.8.17 and i can use it. But i have
> to give chMod 0777 to the directory where i use sqlite. Not only on the
> directory, that contains the sqlite database. let me show it:
> 
> /index.php (uses sqlite database)
> /data/data.sqlite (sqlite database)
> 
> If i give chMod 0777 to /data/ and the files in this folder, it wouldn't
> work and get me an "malformed database - cannot create temp tables".
> 
> I need to gibe chMod to the directory which contains the index.php file.
> That's a big security risk and i don't want to give chMod to the main
> directory.
> 
> Is this normal and can i change this?

You do not actually need 0777.  Your problem is that the user which is creating 
and using the database is the user that runs Apache, not yourself.  So find out 
which user Apache runs under.  This might be perhaps www or _www or _apache.  
Make sure that that user has the rights over this directory.  Then Apache 
(running the .php script) which have enough access to use the database file.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to