- Plesk for Linux
How to enable the option "Restrict the ability to follow symbolic links" for all the domains on the server at once via command line?
Generate the list of subscriptions:
plesk bin subscription --list > /root/list.txt
The following query generates the list of subscriptions that assigned to the particular service plan, e.g. Service Plan:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -Nse "select name from domains where parentDomainId=0 and id in(select object_id from Subscriptions where id in (select subscription_id from PlansSubscriptions where plan_id=(select id from Templates where name='Service Plan')));" > /root/list.txt
Execute the following command to update subscription's settings for the ones from the list generated previously:
for i in `cat /root/list.txt`; do plesk bin subscription --update-web-server-settings $i -apache-restrict-follow-sym-links true; done