Current time: 12-23-2024, 12:17 PM Hello There, Guest! (LoginRegister)


Post Reply 
ftp user bug?
Author Message
nightworm Offline


Posts: 3
Joined: Jun 2011
Reputation: 0
Post: #11
RE: ftp user bug?
I have exctly the same problem like Haros. If you choose a directory of a subdomain for a FTP user you are not able to delete or overwrite files. You will get the "operation not permitted error 550". But if you choose the root directory of your domain there is no problem!

I checked the file system UID and also the UID in the SQL tables. Can't see any difference. I have absolute no idea where to look or what to search for.

Use: Debian Squeeze / proftpd-basic 1.3.3a-6squeeze1

There was one more user with the same error. His solution was to add new ISPCP user for the subdomain.

Thread: http://isp-control.net/forum/thread-1316...l#pid96352
06-09-2011 08:18 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #12
RE: ftp user bug?
I can confirm. Debian squeeze 6.

Add Subdomain (sub.domain.com) and add ftp-user with home "sub" then I can upload but not delete files or folders.

When I take sub.domain.com.conf out of /etc/proftpd/ispcp and restart proftpd then it works again - so there are obviously some rules in this file which are not ok...

I did not explicitly test but it seems to work on lenny... - at least I did not read here... :-/

I'll try to find the block in the conf file which is disturbing...

Just wondering: why do we have blocks in this file for backups, errors, logs and statistics? - theese folders are only present in main domains - not in subdomains.
Domain aliases have errors and logs - but also not backups or statistics...

/J
Ok, I tracked it down... to this block:
Code:
<Directory /var/www/virtual/domain.com/sub/htdocs/*>
<Limit RMD RNTO DELE XRMD>
  AllowAll
</Limit>
</Directory>

if I comment the lin AllowAll then it works... - very strange!!!
But I still cannot delete htdocs itself....

So it seems we could simply reduce this file!


Could others also test?

/J
(This post was last modified: 06-10-2011 09:15 AM by joximu.)
06-10-2011 08:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #13
RE: ftp user bug?
I tested in lenny and squeeze: squeeze fails (and your fix works), lenny does not. I think it is a bug in ProFTPD itself.

However, you are right in that there are too many directives there. If you comment out the whole "htdocs" directory blocks for the subdomains, the problem disappears yet users still can not delete the htdocs folder.

The reason why "htdocs" can not be deleted is because of the "root_domain.conf" file that already builds the necessary protections based on the user's home directory. However, by commenting that block the main user would be able to remove the subdomain's htdocs folder, something we don't want to happen...
(This post was last modified: 06-10-2011 04:47 PM by kilburn.)
06-10-2011 04:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
nightworm Offline


Posts: 3
Joined: Jun 2011
Reputation: 0
Post: #14
RE: ftp user bug?
I can confirm that this file is the reason why this does not work.

Code:
/etc/proftpd/ispcp/sub.domain.de-conf

As described by joximu there are some pathes that doesn't exist for subdomains.

If I comment the line everything works fine again.

Code:
<Directory /var/www/virtual/domain.com/sub/htdocs/*>
<Limit RMD RNTO DELE XRMD>
#  AllowAll
</Limit>
</Directory>

Best regards

nightworm
06-10-2011 04:48 PM
Find all posts by this user Quote this message in a reply
Haros Offline
Junior Member
*

Posts: 36
Joined: Sep 2010
Reputation: 0
Post: #15
RE: ftp user bug?
I second that this "fix" works.

So, is this a problem of proftpd under debian squeeze or ispcp? I mean will this be fixed on the next ispcp release?
06-10-2011 10:38 PM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #16
RE: ftp user bug?
For now I'd say it's a problem with the proftpd delivered with squeeze...

because ispcp did not change anything...

*but* - maybe - proftpd changed something and it's in the docu but noone@ispcp did read this and could change anything...

so...

I think we should find the best solution and implement it.

It can be fixed by changing the corresponding tpl files...

/J
06-11-2011 12:10 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)