Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

check permissions, use flock

by gregw (Beadle)
on Apr 25, 2001 at 04:58 UTC ( [id://75383]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to FreeBSD reading/writing workaround?

Do make sure that you have file permissions set appropriately- you can test whether that is an issue by doing a chmod 777 filename; default Apache configs run scripts as the user nobody and thus often can't write to or append files which don't have proper permissions.

I'd concur with the other poster who encouraged you to look at the flock node and its sample code for doing file locking in Perl. That's a pretty standard approach for ensuring that multiple running scripts can't write to the same file at the same time. (At least if those scripts are all using flock, you won't have a problem. Read the fine print about advisory locking for more details.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://75383]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.