Add to Favourites Add to Favourites    Print this Article Print this Article

Files downloaded in the FileManager are not downloaded, they're displayed as binary in my browser

If you're using the FileManager and files downloaded in the filemanager are being displayed as plaintext/raw instead of their true form (displaying an image, downloading/saving a zip file) the it would imply that the mime types for those files are not being added to the headers along with the file.

The file that DirectAdmin uses to include these types is the /etc/mime.types file.  If this file is missing, not world readable, incomplete, or DirectAdmin isn't using it, this could explain the behavior.

1) Make sure it exists, and check the permissions:

[root@server]# ls -la /etc/mime.types
-rw-r--r--  1 root root 13099 Feb 21  2005 /etc/mime.types

2) Check it's contents for the zip/gz types to see if they're present, eg:

[root@server]# grep zip /etc/mime.types
application/x-bzip2             bz2
application/x-gzip              gz tgz
application/zip                 zip

3) Lastly, check the directadmin config to ensure that the path is still being used:

[root@server]# /usr/local/directadmin/directadmin c | grep mime

If you make changes to the directadmin.conf to adjust the apachemimetypes value, be sure to restart directadmin after making the change.

Was this answer helpful?

Also Read