Why am I getting a "File not found, invalid path or access" error when using the 'filepath' header in the RestAPI on Linux?

This article applies to MetaDefender Core All MetaDefender Core releases deployed on Linux.

When using the RestAPI to send a file under the header ‘filepath', the error 'File not found, invalid path or access’ is returned.

Copy

Even though the file exists and is accessible when traversed manually.

Copy

Main Cause:

MetaDefender Core runs as the ‘metascan' user. When a request is made with the ‘filepath’ header, the 'metascan’ user requires explicit permission to access the file, beyond the permissions granted to normal or root users.

Copy

Resolution:

The metascan user needs at least 'Execute' (x) permission at each folder/file level to access the file. Adjust the permissions on the directory level to grant 'execute' permission. For example:

Copy

Then, verify again

Copy

If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard