Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
+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
add comment

1 Answer

up vote 5 down vote accepted

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>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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