> -----Original Message-----
> From: Willem Pretorius [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 18, 2002 10:36 AM
> To: [EMAIL PROTECTED]
> Subject: RE: file execution from a perl file
> 
> 
> Hi, i am using a fax server from a perl webpage, but i cant send faxes
> because the file permitions is not correct, thus i want to run a chmod
> command eg. " chmod 777 /usr/local/www/fax/* " in order to 
> enable the faxing
> to work, but my question is: How do you execute the command from a .pl
> file?? the faxing works def. if the permitions is set, i only need to
> execute this command. Can anyone help me on this??

(chmod is a builtin function in Perl: perldoc -f chmod)

Is the problem that your script is creating files and you need them to be
world readable so the fax server can read them?

In that case, just issue:

   umask 0;

in your script before creating the files. That should give them 666
permissions. (777 would only make sense on executable files, which I'm
assuming these aren't). Then you won't need to chmod.

perldoc -f umask

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to