+91 - 9161069102 support@megaacshost.com

How to secure ‘public HTML? (step by step guide)

How to secure ‘public HTML? (step by step guide)

In this post, we will explain to you how you could secure public_html. When it comes to hosting your website, permissions are crucial. Permissions will give our server computer access to your files, allowing it to write and edit them. In addition, as a protection precaution, certain files must be shielded from writing and editing.

1. At cPanel user level:

Step::1 Now Login to cPanel and select  File Manager

MEGA ACS HOST

Step::2 Change Permissions from the menu by right-clicking on public html.

MEGA ACS HOST

Step::3 Set the permissions to 0750.

MEGA ACS HOST

2. At Root level:

Step::1 Log on your  WHM root and open Server Configuration

MEGA ACS HOST

Step::2 Open Tweak Settings

MEGA ACS HOST

Step::3 Next select Security tab and search the option “Enable File Protect”

MEGA ACS HOST

Step::4 Now select On button and then the Save.

MEGA ACS HOST

3. Via Filezilla SFTP;’

Step::1 Log on to  Filezilla as root                                           

MEGA ACS HOST

Step::2 Next select  /root and look for “fixperms.sh” file

MEGA ACS HOST

Step::3 Open Below link- https://pastebin.com/K8Xd4DWy

Step::4 Copy and paste the entire code. fixperms.sh file

Step::5 Next then you need to add a Cron Job to This location- /var/spool/cron and edit the file “root”

MEGA ACS HOST

Add a cronjob to run fixperms.sh every hour here. Save the following line:

MEGA ACS HOST

This cron will run fixperms.sh many times to keep the file permissions of all cpanel’s public html files at 0750. You can protect public html this way.

In this method you can setup file permissions of any file in cPanel

Thanks for Reading this post !!!

If you’re looking for cheap web hosting. Please Contact to MEGA ACS HOST. Shared web hosting started at ₹ 399/Year.
Mega ACS Host: Website:- https://www.megaacshost.com/

Follow Us social media

Facebook Page– https://www.facebook.com/megaacshost/

Twitter Page– https://www.twitter.com/megaacshost

Leave a Reply

Your email address will not be published. Required fields are marked *