Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

i have uploaded a file aaa.bin on a remote ftp server... then i have to change his attribute from 644 to 777? how i can do this inside my script?
  • Comment on How can i change the file attributes on a Just Uploaded (trough FTP) file ?

Replies are listed 'Best First'.
Re: How can i change the file attributes on a Just Uploaded (trough FTP) file ?
by Beatnik (Parson) on Apr 25, 2001 at 18:17 UTC
    Net::FTP doesn't support chmod... but you can use quot
    from the Net::FTP POD:
    quot (CMD [,ARGS]) Send a command, that Net::FTP does not directly support, to the remote server and wait for a response.
    Update:Also check FTP manpages compared to the RFC 959

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.
Re: How can i change the file attributes on a Just Uploaded (trough FTP) file ?
by moen (Hermit) on Apr 25, 2001 at 14:42 UTC
    You have to do this through the ftp server command, it got the same name as the perl function jeroenes mentioned namely "chmod".
    You can't to this before uploading or remote through perl unless you use Net::FTP or something similar

    Of course if you got the script running on the remote server there's no problem using chmod after uploading the file.

    Oh..btw, 777 is buhu, use 755 at least if possible.

    moen

Re: How can i change the file attributes on a Just Uploaded (trough FTP) file ?
by jeroenes (Priest) on Apr 25, 2001 at 14:14 UTC