[Proftpd-user] PathAllowFilter
Lala To <[email protected]>
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <CAAX+=YORM8OPJ2_Hqmb8Rzw_ZZTyVRj07cnH2tM=XTK15WEf+w@mail.gmail.com> |
Hi All, I want to configure proftp to only allow only certain file types to be uploaded by users. I tried to accomplish this with the PathAllowFilter directive in the following way: <Directory ~ > PathAllowFilter "\\.(ppt|pptx|wmv|mp4|mp3|wav|wma)$" </Directory> The description of this directive states "PathAllowFilter allows the configuration of a regular expression that must be matched for all newly uploaded (stored) files.", so I assumed the filter would affect files only. But after enabling the configuration, I get this behavior: ftp> [root@testserver test]$ ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 FTP Server ready. Name (127.0.0.1:root): testuser 331 Password required for testuser Password: 230 User testuser logged in Remote system type is UNIX. Using binary mode to transfer files. ftp> put test.exe local: test.exe remote: test.exe 227 Entering Passive Mode (127,0,0,1,224,78). 550 test.exe: Forbidden filename ftp> put test.mp3 local: test.mp3 remote: test.mp3 227 Entering Passive Mode (127,0,0,1,235,172). 150 Opening BINARY mode data connection for test.mp3 226 Transfer complete 6091 bytes sent in 0.000155 secs (39296.77 Kbytes/sec) ftp> mkdir test3dir 550 test3dir: Forbidden filename Uploading test.mp3 and test.exe produces the expected results, but why is the directory creation rejected and how could I prevent this? Thank you very much for your help! Thomas ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html