How to reset user home directory permissions

jwogrady

Member
Jul 9, 2014
12
2
53
cPanel Access Level
DataCenter Provider
I have a user account whose home directory got changed. Is there are way to reset the accounts permissions to the default state? All the posts on this I can find only talks about changing ownership and permission to the public_html directory. What I'm looking for is a script that resets permissions for the entire account to default state. Essentially, I want to restore the account from a security standpoint to the new account state without making any file changes.
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

The /home/$username directory itself is set to 0711 permissions. It's likely easier to backup the account, ensure the archive has all of the files associated with the account included, and then terminate/restore the account.

Thank you.