[Twisted-Python] Client/Server upload problem

Tristan Seligmann mithrandi at mithrandi.net
Thu Jul 22 00:06:06 EDT 2010

On Wed, Jul 21, 2010 at 7:37 AM, Sean Dugan <smdugan01 at gmail.com> wrote:
> When I run this, it returns “Failure: twisted.protocols.ftp.CommandFailed:
> ['550 FtpUpload.txt: Permission denied']”. I can download a file, and view
> the files in a folder, I just can't upload a file. Also if I log-in as one
> the users in the .dat file, instead of anonymous, I can't even view the
> files in a folder. So is there a way to give anonymous or a user in the .dat
> file more permissions, like the write permission?

The ftpserver.py example uses twisted.protocols.ftp.FTPRealm, which
returns an FTPAnonymousShell instance wrapped around the given path
for anonymous users, and an FTPShell instance wrapped around
/home/username for authenticated users. FTPAnonymousShell does not
allow anything other than read-only access, and /home/yourselecteduser
possibly doesn't even exist on your system. You probably want to write
your own realm implementation that does things a little differently;
you can look at the implementation of FTPRealm to get started, it
isn't very complicated.
mithrandi, i Ainil en-Balandor, a faer Ambar

More information about the Twisted-Python mailing list