cPanel - File Manager

cPanel File Manager offers useful options to quickly manage your files within the cPanel interface. It is easy to use and removes the hassles of using FTP. You can create, upload, edit or remove files from this interface. It also offers the function of moving files to the Trash before permanently deleting them, from which you can recover them later.

To open the file manager, click File Manager in the File section.

Microchip Domain Registration Web Hosting

A new tab will open and once you are in File Manager, you will see a dashboard like this.

Microchip Domain Registration Web Hosting

cPanel File Manager gives you a lot of flexibility for navigating your files.

You can use the file manager for the following tasks.

Search for a file #

To search for a file, use the search bar at the top of the File Manager dashboard. You can search all your files, public_html or the current directory, then type the filename in the next input box and click Go to search for a file.

Note: public_html is a folder in cPanel, all files accessible from the frontend of your website are stored in this directory. Index.html or index.php found in this folder are loaded first, when someone accesses your website from the frontend via your URL.

File Manager settings #

To access cPanel's File Manager Preferences, click the setting buttons at the top of the Dashboard. A prompt will appear as shown below.

Microchip Domain Registration Web Hosting
  • By default, cPanel File manager opens your account's Home Directory when you open cPanel. But we can override it by choosing it with Web Root, which is the public_html folder of the public FTP root or with a document root of your domain or any subdomain you create.
  • In Linux, hidden files have a single dot (.) In front. The default cPanel File Manager does not display them, but you can choose to show hidden files by enabling the Show hidden files (dotfiles) option.
  • When we open a text file, which can be HTML, PHP or plain text file, cPanel opens a dialog to check the character encoding of the file, to ensure maximum compatibility, while editing the file. You can disable this feature by selecting - Disable Character Encoding Verification Dialogs.

Working with File Manager #

Creating a file #

To create a new file, navigate to the directory where you need to create the file, then click New File from the dashboard. A prompt opens and asks you for the file name. Enter it accordingly with the file extension and Path, where the file will be created. Finally, click Create New File and a new file will be created.

Creating a folder #

To create a new folder or directory, navigate to the directory where you want to create the folder. Click New Folder from the Dashboard. A prompt will open asking you for the name of your new folder. Enter the desired folder name and click Create New Folder. Your new folder will be created.

Copy #

You can copy a single file or folder or even multiple files or folders. To copy a single file or folder, select what you want to copy with a single mouse click on it and click Copy. You will be asked for the file path where you want to copy the file or folder, enter the path accordingly and click Copy File.

To copy multiple files or folders, click once on the desired files or folders while holding down the ctrl key to select multiple files or folders, then click copy. Enter the desired location and click the Copy Files button to copy multiple files.

Shift #

You can move a single file or folder or multiple files. To move a single file or folder, select the one you want to move with a single mouse click on it and click Move. You will be asked for the file path you want to move the file or folder to, enter the path accordingly and click Move File.

To move multiple files or folders, click once on the desired files or folders while holding down the ctrl key to select multiple files or folders, then click Move. Enter the desired location and click the button to move files to move more files.

Uploading a file #

To upload a file from the cPanel file manager interface, go to the directory you want to upload to and then click Upload. You will find the interface shown below.

Microchip Domain Registration Web Hosting

You can drag and drop the file to upload or you can select the file from the Select File button. If you want the File Manager to automatically overwrite files with the same name, you can select the - Overwrite existing files check box.

Downloading a file #

To download a file from cPanel File Manager, you can select the single file or multiple files with a single click on the file name and click Download to download the files.

Deleting a file or folder #

To delete one or more files or a folder simply select the files with a mouse click and click the Delete button. You will be prompted to send the files to the Trash, if you want to permanently delete the files, select the Skip Trash check box. If the check box is not selected, the files are moved to the Trash folder from where they can be recovered later.

Rename a file or folder #

To rename a file or folder, select the file or folder with a single mouse click and click Rename. You will be prompted to enter a new file or folder name. Enter the file or folder name accordingly and click the Rename File button to save. You can also double-click the Name of any file or folder to rename the file.

Text Editor #

To edit any text file with a simple text editor, select the file and click the Edit button. A message will be displayed with encoding checking if enabled, so click Edit in the prompt to edit the file. The text editor will open in a new tab, where you can edit the file. You can also switch to the code editor from here. When finished editing, click Save to save the file.

Code editor #

code The code editor makes it easy to edit those files, which contain code inside them. Differentiate the color between the codes, which makes it easier to edit such files.

Check out a file #

To extract a compressed file, select the file you want to extract and click the Extract button. You will be prompted to enter the path where you want to extract the files, if you enter a path that does not exist, cPanel File Manager will create the directory and extract the file into it.

Note - cPanel File Manager can only extract files which are in the Zip, GZip and BZip2 compression type.

Compression of a file or folder #

To compress a folder or one or more files, select the files and click Compress. A message will appear, select the compression method where you can choose between Zip, Gzip or Bzip2. It will ask you to enter the file name, enter the file name accordingly and click Compress File (s). After compression, the result will be shown to you.

Viewing a file #

This option helps you to view the content of known file types within the cPanel interface. Select the file you want to view and click View. A new tab will open and you will be shown the contents of the file.

cPanel - File permissions #

All files and directories in the Linux operating system have access permissions. This feature gives the user the ability to set different access levels for each user and the operating system also gets the ability to handle different file access requests. This feature makes the system more secure against potential security threats. There are three types of access permissions -

  • Read - It is indicated with an “r” and the number 4, it gives the possibility to the user to read only the file.
  • Write: it is indicated with “w” and number 2, it allows the user to write only in the file.
  • Run: it is indicated by "x" and number 1, it gives the user the possibility to execute only the file.

Access permissions can also be given in groups, for example, if we want to give a file only read and write permissions, we can assign 'rw–' to that file or in numerical form, we can assign the number 6 - like 4 for reading and 2 for writing is equal to 6.

These access permissions are assigned to three types of users -

  • User - Owns the file.
  • Group: is the user group in which the owner is located.
  • World: refers to all the others.

We give access permissions based on file types in cPanel. By default, cPanel File Manager gives 6-4-4 user permissions: 6 for the user, 4 for the group and 4 for the world. Most of the time, you don't need to change the permissions of the file unless you need to.

You can change file permissions in the cPanel environment using the following steps -

Step 1 - Go to File Manager from cPanel Home.

Step 2: Navigate to the file or folder for which you want to change permissions and select the file or folder with a single mouse click.

Step 3: Click the Permissions link from the File Manager top menu and a prompt will appear as shown below.

Microchip Domain Registration Web Hosting

Step 4: Choose the permissions according to your need and click Change Permissions to save the new file access permissions.