ProFTPD Limit Problem

  • More infos:


    this does not work:


    Code
    1. <Directory /var/www/virtual/*/htdocs> <Limit RMD RNFR DELE XRMD SITE_RMDIR> DenyAll </Limit></Directory><Directory /var/www/virtual/*/htdocs/*> <Limit RMD RNFR DELE XRMD SITE_RMDIR> AllowAll </Limit></Directory>


    you can delete htdocs


    but this works:


    Code
    1. <Directory /var/www/virtual/test1.ch/htdocs>
    2. <Limit RMD RNFR DELE XRMD SITE_RMDIR>
    3. DenyAll
    4. </Limit>
    5. </Directory>
    6. <Directory /var/www/virtual/test1.ch/htdocs/*>
    7. <Limit RMD RNFR DELE XRMD SITE_RMDIR>
    8. AllowAll
    9. </Limit>
    10. </Directory>


    you can work *inside* htdocs but not delete it.


    For me it looks like proftpd has some problems...


    /J


    Upd: I see Sascha, you wrote a message in the german proftpd forum... maybe it should be written in the english/international part... seems to be better used...


    Upd2: I started a thread there...

    Edited once, last by joximu ().

  • Hi Joxi..
    I have a new idea..
    I have both activated..
    The "root_domain.conf"

    Code
    1. <Directory ~/htdocs> <Limit RMD RNFR DELE XRMD SITE_RMDIR> DenyAll </Limit></Directory><Directory ~/htdocs/*> <Limit RMD RNFR DELE XRMD SITE_RMDIR> AllowAll </Limit></Directory>


    and the configfiles for every other ftpuser... But i edited the file like this

    Code
    1. <Directory ~/bcu/htdocs>
    2. <Limit RMD RNFR DELE XRMD SITE_RMDIR>
    3. DenyAll
    4. </Limit>
    5. </Directory>
    6. <Directory ~/bcu/htdocs/*>
    7. <Limit RMD RNFR DELE XRMD SITE_RMDIR>
    8. AllowAll
    9. </Limit>
    10. </Directory>


    Now it is possible to do everything inside the htdocs with the subdomain ftpuser, but this user can't delete the htdocs.
    I tested the same with the ftpuser of the root domain. And it works!..
    Can you test this, too?

  • Hm, if I have a domain and want to create a folder "bcu" inside the mail home - with your "~/bcu" directive no one can remove a folder "bcu" anymore...


    No - the configs for the subdomains (and aliases) have to be with absolute paths - (no relative from home).


    Only the paths every domain has - they can be like this (well - if I create a ftp user which has a home in /var/www/virtual/domain/htdocs/myplaygarden - then this one also cannot remove a folder htdocs...)


    The best way would be: create a conf file for *every* domain/subdomain/alias... - IMHO this would be the most reliable way - for the moment.


    /J

  • Exactly.


    For now this seems to be the one and only good and working solution. i-mscp needs to write a conf file for every domain.


    Maybe we get support from proftpd to find a better solution...


    /J