public_html permissions revert to 755

bmett

Well-Known Member
Aug 5, 2010
71
1
56
Brisbane, AU
Hi there,

Can somebody tell me why the public_html directory of all accounts gets reverted to 750 permissions? I need the permissions to be 755, but it seems, that WHM/cpanel is reverting those to 750 on a regular (daily?) basis.
Is that a cronjob doing that? What script would cause this? Can I stop this?
Cheers,
 

bmett

Well-Known Member
Aug 5, 2010
71
1
56
Brisbane, AU
Maybe you are right and I approached this the wrong way.
Changing the all public_html permissions to 755 would allow any user on the server to access all public_html folders on the server right?
What I want to achieve is to only allow one specific user on the server to access all public_html folders on the server. How would I do that?
Cheers,
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
Hello,

The File Protect functionality will check the permissions and ownership values on each user account's public_html directory and each addon domain's DocumentRoot directory and then set the values accordingly. It also takes into whether modules such as Mod_Ruid2 are enabled, which changes how the ownership values are configured on the public_html directory. As of cPanel 62, it defaults to on and is controlled via "WHM >> Tweak Settings". Here's the relevant section the cPanel 62 Release Notes:

Enable FileProtect with Apache
This setting allows you to specify whether FileProtect is enabled on the system. FileProtect improves the security of each user's public_html directory. If you disable this setting, each user's directory will be at risk.

This setting defaults to On.
Regarding your other question:

What I want to achieve is to only allow one specific user on the server to access all public_html folders on the server. How would I do that?
This is unsupported and considered a bad security practice. Could you let us know what in-particular you are attempting to achieve with this type of setup so we can suggest a potential alternative?

Thank you.