ftplib sendcmd

Bill Scherer scherbi at bam.com
Mon Apr 24 12:11:25 EDT 2000

Howdy -

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!

William K. Scherer
Sr. Member of Applications Staff
Verizon Wireless

More information about the Python-list mailing list