1

I am looking to get a website hosted and using FTP to manage the files. I'd like to be able configure things to allow users, who might have different FTP clients, to only be able to upload text files (and possibly just ASCII) to the FTP server. Is this even possible?

I am looking to use vsftpd as the server, but am not committed to this. The OS will probably be Ubuntu server or CentOS.

2
  • 1
    In general FTP doesn't do MIME type checking, so anything you implement would be FTP server solution specific, and may have to be done as the host's file-system level. This wouldn't stop them from uploading it, it's just deny/delete it once it was uploaded and recognized. Which FTP server are you using, on which OS? Commented Sep 16, 2014 at 13:55
  • Thanks, I've updated the question to include this information. Would there be an FTP server that I should use instead that would be able to check the file format? Commented Sep 16, 2014 at 14:41

2 Answers 2

1

Try FileZilla, it has Filename Filters.

Filename filters provide a way to filter out files and directories with respect to both visibility and transfers.

Keep in mind people can always just change the file extension and upload it anyway. :)

0

Workaround idea: Put all the text files in a directory writeable by a different unix user; your uploaders would use that unix user's login to upload files and would only be able to write to that one directory. So, it's not limiting them to just text files, it's the location that's special.

1
  • thats a bad practice, he/she can uploade any script and can map the all directories/loacations on the server
    – santoshe61
    Commented Sep 4, 2018 at 4:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .