ftplib sendcmd
Bill Scherer
scherbi at bam.com
Mon Apr 24 13:17:19 EDT 2000
Thanks Gordon! This is the answer I needed. It all works great now.
Thanks again,
Bill
Gordon McMillan wrote:
> Bill Scherer wrote
>
> > I'm having trouble with ftplib's sendcmd method (Python 1.5.2 on
> > RH linux 6.1):
> >
> > >>> ftp = ftplib.FTP(host, user, password)
> > >>> ftp.sendcmd('umask 002')
> > Traceback (innermost last):
> > File "<stdin>", line 1, in ?
> > File "/usr/local/lib/python1.5/ftplib.py", line 228, in sendcmd
> > return self.getresp()
> > File "/usr/local/lib/python1.5/ftplib.py", line 201, in getresp
> > raise error_perm, resp
> > ftplib.error_perm: 500 'UMASK 002': command not understood.
> > >>>
> >
> > The umask command does, of course, work using a standard ftp
> > client to the same host.
> >
> > Other commands, chmod, etc, suffer equal fate.
> >
> > Is this not what sendcmd is for? What am I doing wrong? Thanks!
>
> These are not rcf 959 commands. GNU ftpd will support them
> as SITE UMASK x and SITE CHMOD mod file.
>
> - Gordon
More information about the Python-list
mailing list