psychoone7 / pyftpdlib

Automatically exported from code.google.com/p/pyftpdlib
Other
0 stars 0 forks source link

override_perm() should be allowed for home dir #259

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In issue 258 a user expressed the desire of listing directory contents for the 
home directory only.
By using DummyAuthorizer this should be possible by doing:

>>> authorizer.add_user('user', '12345', '/home/user', perm='eradfmwM') 
>>> authorizer.override_perm('user', '/home/user', perm='l')

...but pyftpdlib fails with "ValueError: can't override home directory 
permissions".
The reason I did that was because I wanted the client being unable to 
accidentally remove the user home directory but this is a legitimate use case 
which should be allowed.

It is probably better to do that check in FTPHandler.ftp_RMD() instead.

Original issue reported on code.google.com by g.rodola on 10 May 2013 at 4:15

GoogleCodeExporter commented 9 years ago
Could you provide an example of what you mean?  I'm not sure how implementing 
anything in RMD restricts the user to only list what is in the ftp root 
directory.

Thanks!

Original comment by bmgarns on 16 May 2013 at 2:31