0

user's ftp points to /mnt/ftp/user I want to deny uploading of .jpg extension via ftp to his directory (and for subdirectories too.) I found something like PathAllowFilter but it allows specific exntensions but I need to allow all extensions except .jpg.

Any idea how to do it?

peter
  • 113
  • 5

1 Answers1

1

For this, you can use the PathDenyFilter directive, like the following. Since you mentioned wanting to impose this restriction for a given user (say, user "foo"), and in their directory, I would suggest putting this directive in a <Directory> section:

<Directory /mnt/ftp/foo>
  # Deny .jpg files.  Watch for upper/lower cases!
  PathDenyFilter \.jpg$ [nocase]
</Directory>

Hope this helps!

Castaglia
  • 3,349
  • 3
  • 21
  • 42