File Access Control not blocking XLS Files

Hello there,

i am trying to block old excel files (*.xls) with the files access control app.

xls

What am i doing wrong? Where can i get more information why this is not working?

Best regards!

Are you sure that you’ve covered all kind of mime types related to .xls files? I’ve checked a couple of files on my server and I always got the mime type “application/vnd.ms-excel” returned?! You can use the file command to check the mime type of files on your server. The following command e.g. searches a whole directory tree and returns all mime types of related files:

find . -type f -name "*xls" -exec file --mime-type {} \;

Further information should be found in the Nextcloud log file.

1 Like

Thank you for that authum tip! This helps me now and in the future.

Now i know that most (not all) of these old office formats are “application/octet-stream” MIME-Types. From my point of view its not really possible to distinguish between the old and the new office formats via Mime-Type.

Is it possible to block files only depending on their ending?

I’m personally not using the file access control app, but the workflow_script app. I would assume that you can select file name as a criteria and then use a regular expression to match a specific file extension.