Block filestype like .exe with File Firewall

Steps to reproduce

  1. Installing Owncloud & File Firewall
  2. Created a Group in the File Firewall with these rules:
    • user group is user
    • file mimetype is video/mp4

Expected behaviour

If a user uploads a mp4 he should get an error

Actual behaviour

My second rulegroup (block every file that is greater than 100mb) is working. But i can still upload mp4 files.

Server configuration

Operating system:
CentOS 7.6
Web server:
Apache2.4
Database:
MariaDB 10
PHP version:
PHP 7.2
ownCloud version: (see ownCloud admin page)
10.3.0
Are you using encryption: yes/no
no

The logic of the file firewall app allows only one rule per group.

Can you separate those 2 rules in to 2 groups?

Also what is your exact rule for video/mp4?

1 Like

Yeah it make sense now… my fault

But another question. If i want to add a custom mimetype i have to create an mimetypealiases.json in owncloud/config.
i want to add .vbs, .jar and .ps1. but it doesn’t work…

Here’s what i did:

  1. created a file owncloud/config/mimetypealiases.json
  2. added following rows to this file:
    {
    “jar”:[“application/java-archive”],
    “vbs”:[“application/vbs”],
    “com”:[“application/com”]
    }
  3. $ chwon apache: mimetypealiases.json
  4. $ sudo -u apache php occ maintenance:mimetype:update-js (result = mimetypelist.js is updated)
  5. added a new group (file firewall) with this rule: file mimetype upload is application/java-archive (the same for application/vbs and application/com)

but i can still upload these filetypes…