• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

chmod Event Handler

P

pxdphil

Guest
Basically my problem is as follows:

I have a directory (/wisenav/) in the .skel directory which is automatically copied into each new domain account's httpdocs directory. However, the permissions are changed to 0755 regardless of what they are in the .skel directory (0777). I understand there is no easy way to maintain permissions when files and dirs are copied accross.

The only way I can see to work around this problem is to have a script, that when a new domain name is added, it will chmod the /var/www/vhosts/<new_domain_name>/httpdocs/wisenav/directory to 777.

I know I can achieve this in PHP but I'm having trouble actually getting the <new_domain_name> variable passed to the script with an event handler. It seems as though nothing is happening at all. Even setting up a basic handler that adds the new domain name to a .log file doesn't seem to work.

I must stress that I'm very new to event handlers. I would really appreciate it if someone could point me in the right direction to set up a script that will perform this function. If you could just tell me how to get the <new_domain_name> variable passed into a PHP script as a $ variable I should be able to take it from there.

Your help would be much appreciated.

Many thanks - Newbie
 
Back
Top