Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 17987
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.19
Fixed in: (no value)



Subject: Request: CHMOD support in Net::FTP
Many FTP servers support CHMOD although it's not in RFC 959. The code snippets below implement CHMOD support. I've been using this in my own Net::FTP subclass for about a year. sub chmod { @_ == 3 or croak('usage: $ftp->chmod( MODE, FILE )'); my($ftp,$mode,$remote) = @_; $ftp->_CHMOD($mode,$remote); } sub _CHMOD { shift->command("SITE CHMOD", @_)->response() == CMD_OK } -- Chris
Subject: Re: [rt.cpan.org #17987] Request: CHMOD support in Net::FTP
Date: Mon, 6 Mar 2006 11:06:26 -0600 (CST)
To: bug-libnet [...] rt.cpan.org
From: "Graham Barr" <gbarr [...] pobox.com>
On Sun, March 5, 2006 8:16 am, Guest via RT wrote: Show quoted text
> Many FTP servers support CHMOD although it's not in RFC 959. The code > snippets below implement CHMOD support. I've been using this in my own > Net::FTP subclass for about a year. > > sub chmod > { > @_ == 3 or croak('usage: $ftp->chmod( MODE, FILE )'); > my($ftp,$mode,$remote) = @_; > $ftp->_CHMOD($mode,$remote); > } > > sub _CHMOD { shift->command("SITE CHMOD", @_)->response() == CMD_OK }
Why not just $ftp->site('chmod',$file); This is not a standard command, so I see no reason to include it. Graham.
Show quoted text
> Why not just > > $ftp->site('chmod',$file); > > This is not a standard command, so I see no reason to include it. > > Graham.
Got it. I'll use that. Thanks.