in reply to Re: Can't create file
in thread Can't create file

Hello insaniac, I made the changes you suggested. It still doesn't work. I can see the following error in the Apache error log. [Mon Oct 05 19:57:18 2009] [error] [client 192.168.2.4] Could not open file test123.com.db: Permission denied, referer: http://192.168.2.99/a.html Any views ?

Replies are listed 'Best First'.
Re^3: Can't create file
by insaniac (Friar) on Oct 05, 2009 at 16:05 UTC
    I think the error message is pretty clear; Permission denied!!!

    So, you slutty sysadmin, fix the permissions on that directory or file! (i'm guessing that your Apache user doesn't have write permission there)

    to ask a question is a moment of shame
    to remain ignorant is a lifelong shame

      Hey Insaniac, I know it will work if I change the ownership of the directory /var/named to root.nobody but I don't want to change the ownership. Is there any way I can run the script itself as root.named or as a root user instead of 'nobody'? Thanks for the help till now.
        Back away from the keyboard and unplug that computer from the internet, you're a menace!!
        Yes. Refer to web server's documentation.
        have you tried suEXEC already? http://httpd.apache.org/docs/1.3/suexec.html

        although, for this particular situation, i would not advise it. I would store the files you want to create in a temporary directory (e.g.: /tmp/new_domains) and then have cronjob check that directory and perform the necessary actions ( checking the file for correct syntax, existing files, ...)

        to ask a question is a moment of shame
        to remain ignorant is a lifelong shame