[Twisted-Python] SFTP Server sample

Osborn Chan ychan at quova.com
Tue Aug 23 20:14:31 MDT 2011


Hi Michal,

Actually, I was running the example under root. (sudo)
I was able to list/put/get file for my non-root user after login.
However, listing (ls) doesn't work on top level directory (e.g. /home/ychan), but it works fine anywhere else.

The following shows the issue.

ychan at ubuntu:~/sandbox$ sftp -P 2200 localhost
ychan at localhost's password:
Connected to localhost.
sftp> ls
Couldn't read directory: Permission denied

I guess there may be some issue related to my machine, and I may check it later.

Thanks for you help,

Osborn

From: Michal Mach <michal.mach at gmail.com<mailto:michal.mach at gmail.com>>
Reply-To: Twisted general discussion <twisted-python at twistedmatrix.com<mailto:twisted-python at twistedmatrix.com>>
Date: Wed, 24 Aug 2011 03:14:25 +0200
To: Twisted general discussion <twisted-python at twistedmatrix.com<mailto:twisted-python at twistedmatrix.com>>
Subject: Re: [Twisted-Python] SFTP Server sample

e server needs to execute all subsequent
commands as this user (e.g. when you upload a file this file should be owned by the user "foo")
and therefore temporary changing to user "foo"




More information about the Twisted-Python mailing list