Archives

How to change file permissions in cPanel File Manager

In cPanel File Manager you can set permissions for files. This means you can set who can read, write and execute a particular file. Sometimes you will need to change file permissions for a script installation. 

So, to change file permission in cPanel:

  1. Connect to your cPanel account
  2. Go to File Manager (FILES section)
  3. Navigate to the file  (you can also select multiple files)
  4. Click the Permissions link from the top menu
  5. Select the desired file permission in the Change Permission window
  6. Click the Change Permissions button.
cPanel File Manager - Change File Permissions
cPanel File Manager – Change File Permissions

Some common values for file permissions are:

777 – anyone can read, write and execute the file
700 – owner can read, write and execute the file
666 – anyone can read and write the file
644 – anyone can read the file, only owner can write it
600 – only the owner can read and write the file
400 – no one can write the file; only owner can read the file

As usual, the video tutorial:

If you have SSH access to your account, you can change the file permissions by using the command:  

root@web [/]# chmod 400 filename.php

Use cPanel File Manager to compress/decompress files

In this knowledge base article we will show how to compress/decompress files with the cPanel File Manager.

Steps to compress files via cPanel File Manager

  1. Login to your cPanel account
  2. Go to File Manager from the FILES Section
  3. Navigate to the directory where you have the files you want to archive.
  4. Select the files: hold the CTRL key down and click the files. If you want to archive all the files you can click the Select All button from the File Manager top menu.
  5. Click the Compress button from the File Manager top menu.
  6. On the Compress Window choose the Compress Type (Zip/Tar/GZiped Tar or Bzip2ed Tar) you want to be used. Also here choose the desired archive name. 
  7. Click the Compress File(s) button. The archive will be created and a message will let you know this.
cPanel files compress
cPanel Files Compress/Extract

Steps to decompress(extract) files via cPanel File Manager

  1. Login to your cPanel account
  2. Go to File Manager from the FILES Section
  3. Navigate to the directory where you have the archive that you want to decompress.
  4. Select the archive by clicking on it.
  5. Click the Extract button from the File Manager top menu.
  6. On the Extract Window you can choose the path where the files will be extracted. By default, the path is the current directory.
  7. Click the Extract File(s) button. Archive will be decompressed.

The video tutorial on how to compress and decompress (from 01:42):

You can also compress files and decompress archives on your computer. Use the File Manager or the FileZilla FTP client to download/upload files to your web hosting account.

How to show hidden files (.htaccess) in cPanel File Manager

Many users ask us how they can see the .htaccess files for their websites in cPanel File Manager. By default, such files are not shown. To see the hidden files in cPanel File Manager follow these steps:

  1. Log into your cPanel account
  2. Go to File Manager (Files Section)
  3. Click the top-right Settings button.
  4. Then on the Preferences window, check the option Show Hidden Files (dotfiles)
  5. Confirm the action by clicking the Save button
  6. Now you will see all hidden files (including .htaccess files) in File Manager.
Show hidden files cPanel
Show hidden files in cPanel
Notice that many PHP scripts (like WordPress, DokuWiki etc) need the .htaccess files to function properly. Don’t delete these files. Also take care on editing them.

The video tutorial is here: