4

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
    </Limit>
</Directory>

Is there another way to hide directories?

1
  • +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
5

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
    </Limit>
</Directory>
0

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
    </Limit>
</Directory>

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.