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

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

Replies are listed 'Best First'.
Re^4: Can't create file
by sluttysysadmin (Initiate) on Oct 05, 2009 at 16:16 UTC
    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