Search code examples
proftpd

Disable access to specific folders for specific user in proftpd


I'm running proftpd on my debian server, and all users are managed through ftpdb in mysql. Currently i am trying to hide specific folders from specific user that i have.

I've tried to add the following to my proftpd conf file:

<Directory />
HideFiles (\-specific)$ 
</Directory> 

and its hiding all folders that contain "-specific" in its name, but they are hidden from all users. Any help will be well appreciated. Thank you!


Solution

  • The best way to limit the actions of a user is to use the Limit directive:

     <Directory /myfolder>
       <Limit DIRS>
          DenyUser bob
       </Limit>
     </Directory>
    

    See more information on the Limit and Directory directives in the proftpd howto.