[ftputil] Issue with Hidden Directories

Stefan Schwarzer sschwarzer at sschwarzer.net
Wed Nov 30 23:15:01 CET 2005


Valeriy:

On 2005-10-20 21:35, Valeriy Pogrebitskiy wrote:
> Just wanted to share some information that might save many of you a
> lot of headache researching issues like this... Stefan, you may think
> of ways of fixing this in 'ftputil' as well...
>
> On way too many occasions I saw following situation:
>
> Many FTP servers are configured in such a way that LOGIN directory is
> completely different from "root" user directory. In fact, I found that
> many servers "drop" you into system ROOT ('/') directory upon login.
> When this is the case (when current working directory is the one to
> which user does not have sufficient access) - many ftputil calls (like
> listdir(), getcwd(), etc.) fail with ftputil.ftp_error.PermanentError
> (either "550 Permission denied" or  "550 <EXISTING PATH>: no such
> directory"). This completely prevents any attempts to get or put
> file(s).

Funnily, I meanwhile noticed that the cd operation in this place comes
from another bugfix/workaround. Two people ran into a problem when the
directory part of the path contained spaces. With the cd step the
problem vanished. But I see this got us another problem. ;-)

Thanks for pointing that out, Valeriy. I think I'll change the code so
that it does the cd step only if the directory part contains spaces. Or
perhaps something similar.

> Thanks for making this useful module available (and under a nice
> license).

:-)

Stefan


More information about the ftputil mailing list