Page 1 of 1

Don't allow upload .exe files

Posted: Sat Nov 22, 2025 12:33 pm
by albertorodriguez
Good morning

Is there any way to stop upload exe files?

Thank you

Re: Don't allow upload .exe files

Posted: Sun Nov 23, 2025 2:38 pm
by FTP
You may add a Deny Rule "*.exe" under "Domain > Settings > IP Access", but it will block both upload and download.

So you can also try the following Lua script in the event "Domain > Event Manager > BeforeFileUploaded":

Code: Select all

local filepath = string.gsub("%PathName", "\\","/")
local ext = string.lower(string.sub(filepath,-4))

if ext == ".exe" then
    bCancelEvent = true
end