1
votes

I have CGI programs that write to .dbf files in the cgi-bin folder. On my other servers (Dreamhost, bluehost, others), Apache is set up for me. And it all works, even though the .DBF files have few permissions, e.g.:

-rw-r--r-- 1 treelawn treelawn 38662 Dec 19 15:16 sqhist.dbf

On my new server (Linode), I'm in charge of Apache. And I get a permission error trying to read (or write) any of these files.

So the default setup in Dreamhost/Bluehost must be OK, what is the correct way to give my server access to read/write these files?

Is the correct way just to give access to the apache user (which happens to be www-data)?

1

1 Answers

1
votes

Well just my luck, been searching for hours, as soon as I posted a question I finally found an answer, here:

http://fideloper.com/user-group-permissions-chmod-apache

So, I'm not sure if this is the right way, but I just did this:

chown -R www-data:www-data /var/www

I would still appreciate any comments if this is not the correct way.