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


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin

Files downloaded in the FileManager are not downloaded, they're displayed as binary in my browserLast Modified: Sep 13, 2010, 4:16 pm
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
apachemimetypes=/etc/mime.types

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

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST