Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Writing to a file atomically without renaming

by nomis80 (Sexton)
on Jun 30, 2005 at 19:46 UTC ( #471449=note: print w/ replies, xml ) Need Help??


in reply to Re: Writing to a file atomically without renaming
in thread Writing to a file atomically without renaming

Very nice pragmatic solution! However I'm not in a situation where I can presume that I can chmod the parent dir at will.


Comment on Re^2: Writing to a file atomically without renaming
Replies are listed 'Best First'.
Re^3: Writing to a file atomically without renaming
by waswas-fng (Curate) on Jun 30, 2005 at 20:28 UTC
    Modify IO::AtomicFile's source --
    Change: ### Open the file! Returns filehandle on success, for use as a constr +uctor: $self->SUPER::open($temp, $mode) ? $self : undef; To: ### Open the file! Returns filehandle on success, for use as a constr +uctor: $self->SUPER::open($temp, $mode) ? $self : undef; chown $uid, $gid, $temp;
    Where uid,and gid are static for this app or dynamically built somehow or passed to your version of IO::AtomicFile... chown $uid, $gid, "tempfile


    -Waswas

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2015-07-31 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (281 votes), past polls