KarelB
New Pleskian
I made a small script that sets some permissions of a subdomain after being created:
The script works fine, but the chmod and chown commands are not working. I think they are working, but that the builtin Plesk commands that change permissions and owners overwrite my changes made in my custom script.
I tried playing around with the priority from 0 to 100, but that didn't fix it.
Any suggestions on how to fix this? I really want to be able to alter these permissions and owners after creating a subdom
Code:
#!/bin/bash
SUBSCRIPTION_DIR=/var/www/vhosts/${NEW_DOMAIN_NAME}
SUBDOMAIN_DIR=$SUBSCRIPTION_DIR/${NEW_SUBDOMAIN_NAME}.${NEW_DOMAIN_NAME}
# Fix permissions for the subscription basedir
chmod 755 $SUBSCRIPTION_DIR
# Fix permissions for the subdomain
chown -R karel $SUBDOMAIN_DIR
#chown -R ${NEW_SUBDOMAIN_NAME} $SUBDOMAIN_DIR
chmod 755 $SUBDOMAIN_DIR
#rm -rf $SUBDOMAIN_DIR/www
The script works fine, but the chmod and chown commands are not working. I think they are working, but that the builtin Plesk commands that change permissions and owners overwrite my changes made in my custom script.
I tried playing around with the priority from 0 to 100, but that didn't fix it.
Any suggestions on how to fix this? I really want to be able to alter these permissions and owners after creating a subdom
Last edited: