How to enable the option "Restrict the ability to follow symbolic links" for a list of selected subscriptions via command line?

Created:

2017-02-21 14:11:56 UTC

Modified:

2017-08-08 13:15:30 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to enable the option "Restrict the ability to follow symbolic links" for a list of selected subscriptions via command line?

Applicable to:

  • Plesk for Linux

Question

How to enable the option "Restrict the ability to follow symbolic links" for all the domains on the server at once via command line?

Answer

  1. Generate the list of subscriptions:

    plesk bin subscription --list > /root/list.txt
    
  2. 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
    
  3. 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
    
Have more questions? Submit a request
Please sign in to leave a comment.