Changing File Permissions in cPanel

 

Each and every file and folder in cpanel Linux hosting account has permissions, which command who all can read, write or execute that particular file or folder. When you create the files these permissions will assign automatically. Mostly as a user, you will not need to modify those permissions, although there are few circumstances when any update, setup-installation etc. need a file or folder permissions to need to be changed.

Here you will be provided with the information to run some form of Linux. Here you will be provided with the information on the basics of file permissions. Here the concept discussed must be applicable to most Linux systems which includes the Grid and Server.

 

 

Why file permission is important?

The proper type of file permissions is an extremely important part of ensuring that the website is secure.

Determining the correct form of file permissions for a specific file requires to know what type of information is contained in the file as well as the purpose of that information. There are some guidelines that need to be followed which reside in a web-accessible location.

File permissions are based on three categories on a Linux based system in a web hosting service:

  • User - It is a specific account of the hosting system. You can think of it as general as the person who has uploaded or created the file.
  • Group - It refers to the specific selection of one or more user. Each user belongs to a default group.
  • Other - It refers to any other account on the hosting system.

Here each of these categories can be granted the access in performing the actions on the file:

  • Read - It is an ability by which one can view the contents of the file or the directory.
  • Write - It is an ability by which one can change the contents of the file or the directory.
  • Execute - It is an ability to ask the server for treating the file as a program.

One should never allow more access to the file that is absolutely necessary.

 

What is the required permission for files and folder?

In cpanel, the files should have 644  permission and folder should have 755 permission.

The users whom the directory or folder belongs to should have write access. Apart from it everyone else must be having the read and execute permissions.therefore the folder permission should be 755

Documents, videos, images and audio files each of it belongs to the category of static content. Here the extensions of the file can indicate that it is static content. The list of some of the extensions which indicate that the file is a static content are: .html, .htm, jpeg, .jpg, .gif, .png, .css, .js, .mpeg, .mgp, .mp3, .avi, .txt, .doc and .pdf

Only the users with who the static content file belongs to should be having the write access. Apart from it, everyone else should be having the read permissions. Execute permissions are not harmful but the following rule is least permissive and hence it is not granted the access. hence the file should have 644 permission

The scripts or the binaries which run on the server and generate the web pages fall into the category of dynamic content. If WordPress or some other content is being used for blogging then it falls into this category. Some of the extensions indicating the dynamic content are shown below: .php, .php4, .php5, .cgi, .pl, .py and .rb

For the user, a dynamic content file belongs to the person who is having the read, write as well as execute permissions. No one else should be having any other permissions. Here the rules of the least permissive are extremely important when it comes to running these types of files as are often containing sensitive information such as a database password. So the file permission for script files will be 700 (only one person permission to read,write, execute)

 

You can change the file permission in SSH using the below commands:

To change folder permission:

chmod 755 <folder_name>

Ex: chmod 755 wp-content

To change file  permission:

chmod 644 <file_name>

Ex: chmod 644 index.html

To change  permission for script files:

:chmod 700 script.php

 

Steps to  Change the file permissions using Cpanel:

 

Step 1: Login into C-panel >> go to file manager

Step 2: You can view the File Permissions in cPanel as shown below. File/folders permissions can be easily viewed or modified through cPanel’s file manager option or from any FTP programs

 

 

In the screenshot given above, you can see the permissions of each file and folder in the right-hand side of the screen. One of the most important things you need to remember is that specific files and folders must be set to particular permission. For example:

Folder - 755

.html and .php - 644

public _html - 755

CGI and Perl scripts - 755

Step 3: If the file does not have appropriate permission then you to Change file Permission Setting. You can change the files and folders permission through the cpanel file manager option. In the File Manager, go to the file you want to change the permission to >>  hit right click of your mouse in that particular file

Step 4: choose change permissions from the menu as shown in the screenshot below:

 

 

Step 5: You can easily change the permission window where you can easily alter the setting as you want by checking or unchecking the boxes next to the permissions.

 

 

Step 6: Once you are done with adjusting permissions, click the Change Permissions button.

Note :

You should only change permissions if it is needed and make sure you are not permitting additional access to your valuable files and folders that is essential because doing that can leave your web page unprotected.

If you are looking more information or need additional help related to this, feel free to contact our support team. you can contact us at http://www.hostingraja.in/support/

 

 

How to Backup & Restore a Website in cPanel?

 

C-Panel is one of the easiest tools to manage a website and cPanel backup system offers several choices for backing up and restoring your website. A Full Backup is a full backup that contains your home directory, Your MySQL databases as well as your email forwarders and filters. You can use Full backup option if you are planning to move to another cPanel Linux VPS server.

Taking the backup of the website:

While taking the backup of the website you can neither take the full backup or partial backup.

By opting to take a full backup, you can take the full backup of your account where the files related to the website and configuration. It is generally used when the website needs to be moved to another server. You also keep the backup in your local system as a copy.  

By opting to take a Partial Backup, you have the opportunity to back up the Home directory and restore any of the following: The Home Directory containing the public_html folder that includes your website’s file, the  Databases, Email Forwarders, Email filters.

Follow the below steps to take backup of your website:

Step 1:  Log into your cPanel of your hosting account, you can do that by pointing your browser to http://your_ip_address:2083 and utilizing the credentials given for your Linux VPS server.



Step 2: After you login into your c-panel in the main screen of cPanel >> Under files section >> click on backup

 



Step 3: After clicking on backup >> as per requirement you can choose full backup or partial backup. For full backup click on >> Download a full website backup.

For partial backup go to Partial Backups section >> click on the Home Directory option. After you click on  Home Directory button >> a pop up will appear to download backup on your local system. You need to choose the location where you wish to download your backup and press OK button.

 



The backup of your Home Directory will be compressed and downloaded to the local system of your Linux VPS server. Following the above steps, you can take the backup of your website.

It is always recommended that to take the backup before you make any changes in the configuration or website. And it is not recommended to store the backup in the file manager. The backup will be created in the form of a zip file (compressed file) which can be downloaded into your local computer for storage. It is always best to maintain your own backup (complete backup of your website)on your local system if even if the backups are taken at the server end as it would ensure that the website files and emails are safe.

Restore Website using cpanel

For restoring the website there are two options available to restore.

>> Restore a Home Directory Backup

>> Restore a MySQL Database Backup

Follow the below steps to restore your website:

Step 1: Log into your cPanel of your hosting account, you can do that by pointing your browser to http://your_ip_address:2083 and utilizing the credentials given for your Linux VPS server.

 

Step 2: After you login into your c-panel in the main screen of cPanel >> Under files section >> click on backup

Step 2.1: Follow the below steps to restore a Home Directory Backup

Step 1: To restore your website’s files >>go to the Restore a Home Directory Backup option >> and click on Choose File and the files which has to be uploaded

Step 2: You need to upload the file from your local system to your server.

Step 2.2:  Follow the below steps to restore a MySQL Database Backup

Step 1: To restore only the MySQL database >> go to the Restore a MySQL Database option >> and click on Choose Files >> next choose the file from your local system and upload it to your Linux VPS server.

Step 2: After the MySQL database is restored in your server you will get the below message “Congrats! Ideally restoring your database to a previous working form that you have backed up, has effectively brought back your missing information or enabled your site to work again properly.”

If you are facing any issue while restoring the website or while taking up the backup, feel free to contact our support team via live chat, email, toll-free or ticket system and our support team is available 24/7.

 

How can I reset my cPanel password for my domain?

 

Today having a websites plays an important role in a business. Because with the help of a website it is very easy to get connected with customers around you and also with the customers across the globe. Moreover, today if you have a website then you can easily showcase your business service and products to those people. And today there are a wide range of domain hosting platforms are available, all you need to do is choose the right and best hosting for your website. For best domain hosting you can contact our sale team or navigate to our home page where we provide best in class domain name and hosting service at an affordable price. We also provide 99.9% server uptime with 24/7 customer support.

 

But today if you are using the service and now if you want to change the of your domain password then no need to worry. With the help of cPanel, you can easily reset the password. And it is always better to keep updating or change your cPanel password because it will help your website to keep away from hackers. You can follow the following steps If you have purchased the cPanel hosting from HostingRaja, We generally provide cPanel based service only on Linux hosting and Linux vps hosting.

 

To reset the password follow the below steps.

 

>>> First you need to Log into your cPanel

 

>>> Go to preference

 

 

>>> Now click on Password & Security in there you will find Change Password in there first you need to enter your old password and next you need to enter the New Password. If you want you can also use the password generator option for strong passwords.

 

>>> Once filling all the tabs at last click on " Change your password now!" option.

 

 

Once clicking on " Change your password now!" option your password will be changed and you can copy the password and store it in a safe place.



How to Configure Cpanel Email ID in Gmail

Today email plays as an important medium of communication in all the field, moreover today everyone uses email facility for their business. And today if you are using an email service for your website then you can easily get connected with the people around you not only that with the help of email you can also do marketing of your products. And in this way, it helps your business to grow. And today if you are using a website and if you want to configure your website email with Gmail account then here is the solution for it.

In this page, we will discuss how to configure Cpanel Email ID in Gmail. When hosting your domain in a cpanel, In cpanel, you can set up email accounts, email forwarders, spam filtering, and other features. You can an email address for the domain (something like abc@yourdomain.com) and you access your mail through webmail. The most commonly used webmail software are SquirrelMail,Horde, and RoundCube and these tools are good for sending and receiving emails but they are not as comfortable as Gmail. Gmail has a good interface, folder structure, Spam filtering,  easy to access email from anywhere from any mobile device.

Hence setting up your cpanel mail account in Gmail is worth it.You can easily combine hosted cPanel email address with current Gmail address. Thus you can send/receive emails through Gmail without bothering about hosting company email tools.

 

Steps to create an email account in your cpanel:


Step 1: Login to your cPanel using https://yourdomain.com/cpanel replace yourdomain.com with your domain name. (use your cpanel username and password to log in)



Step 2: In email accounts, click on add Email Account and enter the required details for creating a new email account for your business:

Email: enter your email account name

Domain: Enter the domain for which you want Email id (if you have more than one domain in your cpanel)

Password and Password (again): Enter the password for the email account, you can also generate the password using the password generator but be sure to copy the password.

Mailbox Quota: Enter the Quota of your mailbox, you either give your Quota or select Unlimited




Make sure to use strong passwords for an email address. Having weak passwords allows hackers to steal information from their accounts. So use a strong password.


Step 3: After you enter the required details >> click on create the account, your email address will be created successfully.


Steps to Configure Cpanel Email ID in Gmail


Step 1: Login to your Gmail account

Make sure to use strong passwords for an email address. Having weak passwords allows hackers to steal information from your accounts. So use tough password.

Then click on the create button to finish.

That’s all you have successfully created a business email address.

Step 1: Login to your Gmail account


Step 2: Click the gear icon on to the right side, and click the setting.

Step 3: Click the tab “Accounts”, in Send mail as section >> click on Add another email address

Step 4: In the section, enter your name and email address and click on the next step.

Step 5: Click the next section, Enter you need to configure your mail to be sent through SMTP, for configuring this enter the following details:

SMTP server: Enter the SMTP server provide, mail.yourdomain.com (eg mail.abcxyz.com)

Port: Select the port number: 25

Username: Enter the email id of your domain name (e.g. mail@yourdomain.com)

Password: Enter your password of mail id

Select which secured connection you need either by TLS or SSL, Select the appropriate checkbox


After you enter the details >> Click on Add account.




Step 6: You need to verify the your mail ID >> Open your mail account  >> you can either click the link in the message Gmail sent or enter the confirmation code in the Accounts section of your Gmail settings.

Note:

If Gmail sent a verification email and you didn’t receive it, try checking your Spam folder for a message.

If you are looking for the best email hosting solution for your website then here at HostingRaja we provide best in class email hosting solution with the latest features at an affordable price. Not only that we also provide 24/7 customer support via phone, ticket system, and email. Get your email hosting solution today from HostingRaja India's #1 hosting provider!!





How to login using SSH Key in cPanel


Here we will be going through a step by step process by which you will be able to generate the SSH Key in cpanel. But before that one should understand an SSH
SSH is a software which allows a secured file transfer and remote logins over the internet.
 
SSH key Explained
There is a good possibility that your SSH username and password can be hacked, and as a result it can be misused as well. An SSH key is used to authorize your SSH access, it is another type of password by which you can login to your SSH account.

The SSH protocol uses public key cryptography for authenticating hosts and users
This authentication is the SSH key. SSH key is generated by the cPanel using keygen program.

Step by Step process by which you will be able to generate the SSH Key.

Step 1: Login your cpanel. The cPanel login details will be provided to you by your web hosting provider. After logging into the cPanel the dashboard will be visible to you. As shown in the below snapshot.

Step 2: On the cPanel dashboard you will be able to see a security section. From there you have to select the ssh access.


   


Step 3: Once you click on the SSH access click the manges SSH keys.



Step 4 :  

After clicking Manage SSH keys  you will be able to see to options Generate a New key and Import key. You need to click on Generate a New Key for generating new key for ssh login.



Step 4(a)(1)

Once you click on the generate a new key you will be redirected to a screen as shown below.




Step 4(a)(2)

After putting in the necessary details like the key name, key password you need to click on generate key.
Once you have clicked on the generate key option your key generation will be completed as shown below




Step4(b)(1)
If you don't want to generate a new key you need to click on import key.





Step4(b)(2)

After clicking the import key a page will be displayed as shown below


    
Step4(b)(3)

Now you need to choose the name for this key. You can choose the key according to your wish. Now you need to paste the public key and the private key in the space provided.

 

Once the key is generated. You need to go back and check if the public and private key is created or not.  If it is created you need to click on the Managed under public keys.


Step 5

Once you click on the manage section a page will appear as shown below. You need to click on the Authorize tab.




Step 6

Now you need to go back and in the Private Keys section you need to click on View/Download as shown below





Step 7

Once you click on View/Download you will see the screen as shown below




Step 8

On the same page you will be able to see a section which says Convert the “key name” to PPK format as shown below





Step 9
After putting in the password you need to click on convert.

By following these steps you will be able to download the Private Key for SSH login.