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?

Castaglia
  • 3,239
  • 3
  • 19
  • 40
  • +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

2 Answers2

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>
Steven Monday
  • 13,019
  • 4
  • 35
  • 45
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>
sysadmin1138
  • 131,083
  • 18
  • 173
  • 296