1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

chmod Event Handler

Discussion in 'Plesk for Linux - 8.x and Older' started by pxdphil, Nov 9, 2006.

  1. pxdphil

    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