Ftp

I think what you are asking for is outside the remit of ftp.
As I understand it (and I may be wrong) ftp saves files according to the
umask (specified file permissions) defined in the ftp server’s
configuration. Its purpose is transfering files - something else has to
make the executable. I expect there is also a security justification
there somewhere too.

You can make dirs ftp.mkdir or delete dirs ftp.rmdir but there’s no
single command to do both. But presumably you can check for the
presence of a directory

···

-----Original Message-----
From: Andrew Davies [mailto:adavies@optushome.com.au]
Sent: 01 August 2002 01:40
To: ruby-talk ML
Subject: ftp

I uploaded from windows m.e. and I used:

ftp = Net::FTP.new(‘www.4gigs.com’, user, pass, )
files = ftp.chdir(‘public_html’)
ftp.puttextfile(‘it.rb’, ‘it.rb’)
ftp.close

Is there some command like maybe?
ftp.chmod( ‘it.rb’, 755 )

or ftp.make_or_remove_a_directory?

Andrew Davies


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:



This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit


Any views or personal opinions expressed within this email may not be those of Talis Information Ltd.
The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.

Thank you for your help.
I found this from a previous post …

I found that Net::FTP does not offer
the option to use SITE commands

Fortunately, I was able to add it easily enough:

 def site(sitecmd)
   cmd = 'SITE ' + sitecmd
   voidcmd(cmd)
 end

ftp.site(‘chmod 755 somefile’)