Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: chmod in perl

by graff (Chancellor)
on Mar 11, 2011 at 05:34 UTC ( [id://892587]=note: print w/replies, xml ) Need Help??


in reply to chmod in perl

If you happen to be on a unix/linux system (which is pretty much the only place where chmod makes sense), you should be aware that chmod will fail when used on a file that is not owned by the user who is running the script. (update: unless of course the user happens to be "root" -- in which case the user really ought to know what s/he is doing...)

As mentioned above, checking the return value (and printing the value of $! when chmod returns false) will help you figure out what is going on.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found