Is it possible to hide directories with Proftpd?

Specifically .svn directories.

There is a HideFiles but not a HideDirectories directive. The problem with HideFiles is that it doesn't match on full path.

<Directory /home/ftp_user/my_project >

    # Despite trying to hide this directory it still shows up 
    # as /.svn in the ftp client.

    HideFiles "^\.svn" 

    <Limit ALL>
        allowuser ftp_user

Is there another way to hide directories?

  • +1 - those .svn folders constantly cause issues when someone downloads a site via FTP that was one a subversion working copy – Mark Henderson Oct 13 '10 at 20:48

According to the HideFiles documentation, HideFiles only gives files "hidden-ness", it doesn't actually hide them. To hide them, you need to use IgnoreHidden within a Limit block. So, try this:

<Directory /home/ftp_user/my_project>

    HideFiles ^\.svn$

    <Limit ALL>
        AllowUser ftp_user
        IgnoreHidden on

The Directory must be use /

<Directory />
# Enable hiding data based on user, group, and files the logged
# in user would have no access to.
    HideNoAccess on
    HideUser on
    HideGroup on
# Hide files in the parent directories.
    HideFiles (^\..*)
    <Limit ALL>
        IgnoreHidden on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.