Home WebServer PanelDirectAdmin Allow downloading tar.gz file on DirectAdmin

Allow downloading tar.gz file on DirectAdmin

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

1. Overview

In this article, AZDIGI will show you how to download the tar.gz file on DirectAdmin.

In the process of using DirectAdmin, you will use the backup or compression feature. However, we cannot download the tar.gz file format; when clicked, the browser will try to read the file but not download it.

Below is an image when we can’t download the tar.gz file but are directed to a confusing page.

Screen Shot 2020 07 21 at 12.57.11 PM

2. Allow downloading file tar.gz DirectAdmin

To allow DirectAdmin to download the tar.gz file, follow these 2 steps.

Step 1: SSH into your DirectAdmin system

To allow DirectAdmin to download the tar.gz file, we need to SSH with root privileges first. If you do not know how to SSH into your VPS/Server, you can refer to the following tutorial:

After successfully SSH, we continue with step 2 to edit the file to allow the formats to be downloaded.

Step 2: Edit the file mime.types to allow these types of formats to be downloaded

To edit this file, you can use the command:

AZDIGI Tutorial
vi /etc/mime.types
    

Then add the following line to this file and save it.

AZDIGI Tutorial
application/gzip                                gz tgz
    

To edit, you can do the following:

  • Press Shift + G to go to the bottom of the file.
  • Press O to add a new line.
  • Insert the content and tab out accordingly as shown below.
  • Then save it by pressing the ESC button => Press two characters => Press Enter.
Screen Shot 2020 07 21 at 3.00.48 PM

Step 3: Restart DirectAdmin to get the new configuration

So we can download the DirectAdmin tar.gz file, You need to restart DirectAdmin to receive the new configuration. The command to restart DirectAdmin with all operating systems is as follows:

AZDIGI Tutorial
echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue.cb
/usr/local/directadmin/dataskq d20 --custombuild
    

After the restart is complete, we try to download the tar.gz file again to see if it can be downloaded.

Here is the picture after I retry:

Download the tar.gz file on DirectAdmin

When clicking on the file name, the file can be downloaded normally like any other file.

Summary

So you know how to allow DirectAdmin tar.gz file download with two easy steps. Instead of downloading via FTP/sFTP, now we have another method through the DirectAdmin interface.

Hope this article will be helpful to you. If you find this article useful, please share it widely.

Wishing you success.

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign