Hello, I've had this question before (https://forums.cpanel.net/f5/possible-have-domain-point-1-directory-cpanel-another-243291.html) and have learned to make the edits manually for what I needed.
I am however running into an issue now where the /var/cpanel/userdata/USER/DOMAIN.com is changing the user: field on previously modified files.
I.e.
documentroot: /home/CORE-DIR/public_html
user: CORE-DIR <--- changes back to OWNER of that cpanel account
My issue is now when I run the httpd restart it will crash those previously working sites due to user not having access to CORE-DIR.
My Question:
Is there a simple batch file I can write that will scan /var/cpanel/userdata/* for all files that contain "documentroot: /home/CORE-DIR/public_html" and change the "user:" from OWNER -> CORE-DIR.
Thank you.
NOTE: I am using SSH to make all changes to files BUT am using WHM to create the accounts, which could be causing the conflict I am having. If there is an easier way to create cpanel accounts inside SSH that will not change previously modified "user:" fields, please let me know.
I am however running into an issue now where the /var/cpanel/userdata/USER/DOMAIN.com is changing the user: field on previously modified files.
I.e.
documentroot: /home/CORE-DIR/public_html
user: CORE-DIR <--- changes back to OWNER of that cpanel account
My issue is now when I run the httpd restart it will crash those previously working sites due to user not having access to CORE-DIR.
My Question:
Is there a simple batch file I can write that will scan /var/cpanel/userdata/* for all files that contain "documentroot: /home/CORE-DIR/public_html" and change the "user:" from OWNER -> CORE-DIR.
Thank you.
NOTE: I am using SSH to make all changes to files BUT am using WHM to create the accounts, which could be causing the conflict I am having. If there is an easier way to create cpanel accounts inside SSH that will not change previously modified "user:" fields, please let me know.