NC16 - Block Files

Hi, is there a way to block files by file extension during the upload?

Hi,

did you try Nextcloud’s File Access Control app:
https://docs.nextcloud.com/server/16/admin_manual/file_workflows/access_control.html#prevent-uploading-of-specific-files

Hello, thanks for the answer. I activated the app. According to the manual one can lock with regular expressions file types. I want to lock file extensions, example: as a protection against ransomware I want to ban office documents with macro for the upload.

hey heckflosse,

do you know any existing office file-extension which shows that there are macros involved?
at least I am not aware of any so it would be really difficult to do it.

but maybe you want to enable ransomware protection-app on your server and see how far you’d get with it.

https://filext.com/faq/office_mime_types.html
lists some mime types, ex:
application/vnd.ms-word.document.macroEnabled.12 for docm-files

1 Like

thats a cool info-site. i really wasn’t aware of the fact that there are extra extensions for macro-enabled files.
but what if a .docx-file contains activated macros as well? i already had that (no virus, though) and it didn’t show up as being a .docm-file. as a matter of fact i never really ever saw a .docm-file so far

Excellent! Thanks for the link. Will test tomorrow. Generally it would be better to have a positive list and thus only allow certain files.