Resetting permissions in directadmin

Resetting ownership and permission of directAdmin created system files

Hi there might be a situation when your permission of system files in DirectAdmin is altered accidentally might create issues in doing backup and restore or in mails or others things.In that case directadmin has scripts to fix it.But there is one limitation to this script is that it can not change the permission of user uploaded files in public_html or private_html .This is not limitation actually because various scripts set this altered permissions to better execution of the script.So this script is made not to touch user uploaded file or folders permission.Please see below steps to reset permissions in directadmin.

Step 1:- Login as root

Step 2:- For resetting all accounts and every thing on DirectAdmin use following command

cd /usr/local/directadmin/scripts
./ all

For resetting permissions and ownership of single domain issue follow from command line.

./ domaindir

Please replace with actual domain.

To Reset users’s home directory permissions use below

  ./ user_homes

To reset DirectAdmin system files and folder only use following

  ./ da_files

For resetting mysql permissions use below

  ./ mysql

To reset email permissions use below

  ./ email

To reset etc configuration files use below

  ./ etc_configs

To reset logs file permissions use below

  ./ logs

To reset home dir of specific user in DirectAdmin use below

  ./ set_user_home <user>

Please replace <user> with actual directadmin user

Note:- Recently some one was having issue creating a backup in direcadmin he was getting following error message which encourage me to write this article.

An error occurred during the backup
2020-4-15 00:09
Parent directory does not allow write, or one of the directories didn’t allow search (execution) permission

Fixed it by executing the following donot forget to replace with actual domain on DA

./ domaindir
Was this article helpful?

Leave a Reply

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