Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: root unable to unlink files

by ig (Vicar)
on Sep 01, 2009 at 15:13 UTC ( [id://792683]=note: print w/replies, xml ) Need Help??


in reply to root unable to unlink files

A program running as www-data can't easily create a file in the outbound spool owned by root.dialer. There may be some error in your assumption about the web server process or which process is creating the file in the outbound spool.

When unlink and rename fail, they return error indications. What is the return value and what is $! set to immediately after the calls to these functions? What are the values of "$queue/$call_file" when these functions are called?

I usually call these functions as follows.

unlink($path) or die "unlink: $path: $!"; rename($oldpath,$newpath) or die "rename($oldpath,$newpath): $!";

Can you do similarly? Are errors reported?

update: What makes you think that unlink and rename were executed?

Maybe you can call them as follows:

unlink($path) or die "unlink($path): $!"; warn "unlike($path) succeeded"; rename($oldpath,$newpath) or die "rename($oldpath,$newpath): $!"; warn "rename($oldpath,$newpath) succeeded";

Then check your error output: you should have either an error indication that specifies the cause of the error or a positive indication that the function call was successful.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2024-03-28 12:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found