File permission changing automatically in Linux shared plan

At times you might get an internal error or you will get an error while browsing the website. In majority cases, this will happen when your file or folder permission is incorrect. You can solve this problem, by changing your file or folder permission to default.But at times without you changing file permission, the permission will change automatically to 000 or any other value.

By default, the file permission must be 644 and the permission for the folder must be 755

The  common reason as to why your file permission changes automatically are listed below:
1. When more spam emails are sent from the particular file or from the contact form of the website so the server automatically changes the permission. This happens mostly in the shared hosting environment as to prevent the server from being blacklisted. The server can be blacklisted when too many spam emails are sent from the server which will cause the other email servers which are located throughout the world to blacklist the server IP address. And when the IP address is blacklisted, then Email from this server will not be delivered to other servers.

For example: If on a website which has a registration form and if there are many spam emails sent from the registration form , which might cause the server to be blacklisted so to avoid such circumstances server changes the file permission to 000. To avoid such cases you must require to insert captcha on the registration form.

2. The file permission can change for the particular file when it gets a maximum number of hits are there the website.For example, You have a login page on your website, the hackers can use different IPs and login details to access your website by which your website’s hit rate will increase as a result of which the server will change the permission for that particular folder. You can avoid such cases by adding captcha or be restricting the access to the login page.

Starts at Rs. 69
VPS Hosting
VPS Hosting
Starts at Rs. 732
Cloud Hosting
Cloud Hosting
Starts at Rs. 2680
Windows Hosting
Windows Hosting
Starts at Rs. 199
Starts at Rs. 4499
Linux Hosting
Linux Hosting
Starts at Rs. 69
When your file permissions automatically the solution to avoid such cases are as listed below:

1.Changing file Permission Setting
You  can change the files and folders permission through the cpanel file manager option. As explained in the below steps:

Step 1: Login into you C-Panel of your domain >> and click on the File Manager

Step 2: select the folder or the file for which the file permission has to be changed and right click on the selected folder or file. You will get a drop down box as shown in the below image then you need to click on change permission.

Step 3: On this step, you will see the change permission window where you can easily alter the setting as you want by checking or unchecking the boxes next to the permissions. Once you are done with adjusting permissions, click Change Permissions button.

1. 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

2. You need to add captcha image to pages where many emails/spam emails are being sent,In pages like registration page , contact form or login pages. A captcha basically stands for "Completely Automated Public Turing test to tell Computers and Humans Apart" which is used to make sure that the messages are sent automatically.

3.After you have added the Captcha to pages it is better to make that your username has not been blacklist in the server, You can check whether your username is blacklist by visiting the below path :
If your username is listed in the email-blacklist.txt  then you have to remove your username.
And avoid the file permission changing when more are sent from that particular file should add your username to the php_email_sending_exception.txt ,