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.

I am generating user config files for vsftpd on Debian Linux. The config files are simple in nature, but I am running into one issue. Is there a way to escape a space in the file name(s) for the deny_file or hide_file configuration settings?

Example - can I escape the space in /Test folder*?

# Example config file excerpt
deny_file={/Folder1*,/Test folder*}
hide_file={Folder1,Test folder}
share|improve this question

2 Answers 2

Have you tried the standard linux syntax?

deny_file={/Folder1*,/Test\ folder*}
hide_file={Folder1,Test\ folder}
share|improve this answer
    
I have... It does not work. The folder is shown like it is not even denied/hidden. –  Buggabill Nov 26 '13 at 19:56
    
Why must the folders have spaces? Would a folder symlink work? Eg: deny_file={/Folder1*,/TestFolder*} and have ln -s Test\ Folder TestFolder –  kevinf Nov 26 '13 at 20:16
    
The folders have spaces in them, because they are coming from a Windows machine. –  Buggabill Nov 26 '13 at 21:18

Since deny_file and hide_file have some regex control, you may try to replace the space with ? or .

You will have to test both options though:

deny_file={/Folder1*,/Test?folder*}
hide_file={/Folder1,Test?folder}

and the other option:

deny_file={/Folder1*,/Test.folder*}
hide_file={/Folder1,Test.folder}
share|improve this answer

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.