Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: System and CGI - File Created but not the Content (Similar Situation)

by snopal (Pilgrim)
on Sep 18, 2007 at 18:53 UTC ( #639731=note: print w/replies, xml ) Need Help??


in reply to System and CGI - File Created but not the Content (Similar Situation)

You might not have permission to write to the file.

The system call to chmod swallows up any error messages, and will not report the output to any error log. You are better off using the perl chmod command because it will complain when it has trouble.

It is feasible that your code could create a file to which it can not write. You need to check not only the resulting permissions on the file, but the immediate parent directory as well, assuming it exists.

UPDATE: What I mean is that you might have all the permissions turned on, but the wrong user owns the file. It looks like due-diligence on your part, so I'm just throwing stuff out there.

  • Comment on Re: System and CGI - File Created but not the Content (Similar Situation)

Replies are listed 'Best First'.
Re^2: System and CGI - File Created but not the Content (Similar Situation)
by holandes777 (Scribe) on Sep 23, 2007 at 14:31 UTC
    Checked all permissions. The apache configuration has apache as the user that executes and the file is 666 and owned by apache when it is finished. The parent and its parent are 777 (also owned by apache). Error logs are empty of any references to this. That's why I don't get it. I'll try the perl chmod suggestion to see if I get error reporting and let you know.
    I am presuming that the configured user for apache (called apache) is what is running the script.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://639731]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2020-10-29 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (271 votes). Check out past polls.

    Notices?