Topic: Setting Necessary File Permissions

I know that PunBB requires full r/w permissions for some files/folders - otherwise, how could it record the posts? tongue

What I would like to know is; exactly which files need write permission? Exactly which folders? I would like to put as much as possible read-only for the Apache user, to limit intruder access should they get in (and one day somebody will...). Unfortunately, I don't know exactly what, where, needs access. I tried limiting write access to only the Cache directory and the database file (I'm using SQLite) - but that caused PunBB to stop functioning.

This isn't a huge problem, as I doubt any attacker could do much on my system (I'm only running Apache and SSH - no FTP access whatsoever), but I would like to know anyway. Helpful for future usage.

Thanking you in advance.

Re: Setting Necessary File Permissions

Obviously PunBB should be able to read everything, and the only things I can think of that need write permissions as well are the cache directory (and any files you already have within it), the avatars directory, and the SQLite database. What error(s) did you get when it was set up like that?

Re: Setting Necessary File Permissions

Okay, with only the Avatars directory, the Cache directory, and the database file set to write access, this is the error that comes up.

An error was encountered
File: /www/docs/bgc-rpg/include/functions.php
Line: 78

PunBB reported: Unable to insert into online list

Database reported: unable to open database file (Errno: 14)

4 (edited by Smartys 2006-05-19 10:54)

Re: Setting Necessary File Permissions

Aha, I just saw this on a site

SQLite requires the directory the database file resides in to be writable by the webserver in order to write lock files

That would explain the issue! smile

Re: Setting Necessary File Permissions

Thanks for that! smile

I did a little relocating and tweaking, and now it appears to be working fine. With a nice limitation on where files can be written - much easier to spot lurkers.