Joakim Schramm wrote:
Hi! I have a have problem that I heard have to do with the Apache webserver, but the voice never said anything about to solve it... to be able to access, open/read/create a text (data) file I have to chmod the directory to 777, which is not so good, but otherwise it just don't work to use the open command in a perl cgi script.
Someone know how to get around this? 766 or even 666 should be enough, if not 644... but that might is just for the file.
Also I notice that a file created by open is given ownership to user "wwwrun" and group is "nogroup", is this correct?
Have tried to figure this out but with no success.
I don't run an online server, but practice and learn offline with apache and cgi. As far as I know, it is best to have wwwrun and nogroup own everything, even the cgi-bin. Then set the cgi-bin priviledges to read,write,and execute by owner, which is wwwrun, and no priviledges for anyone else. I have run practice flat-file databases this way, and wwwrun creates the database.txt files just fine in cgi-bin. wwwrun owns the file. - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e