Fix Permissions

I was wondering if there is a way to run the Validate Virtual Servers -> Fix Permissions from the command line. I didn’t see anything mentioned in the help for the “virtualmin” command.

Howdy,

Sorry, I don’t believe there is a way to do that from the command line… if you didn’t want to use the GUI for that, you’d probably need to manually do that from the command line using chown.

-Eric

Has this issue / feature been updated yet?

Being able to run a command line process, to do this, would be great. I currently run a command, as root, to update all the Drupal sites on my server

cd /home/domain-one/public_html/sites/default/ && drush vset update_check_disabled 1 -y && ls -l && drush cc all && drush rf && drush up -y && cd /home/domain-two/public_html/sites/default/ && drush vset update_check_disabled 1 -y && ls -l && drush cc all && drush rf && drush up -y && (repeat - or next command)

Once this has run I then have to run the Fix Permissions from Virtualmin panel as any updates have been installed as root

I have found this script, by austinfwd, but have not tried it yet

https://www.virtualmin.com/node/22640

Thanks

Howdy,

Yup! Jamie did indeed add that feature to the command line tools.

You can see the options available with that by running this command as root:

virtualmin fix-domain-permissions

-Eric

Created a file as root and ran

virtualmin fix-domain-permissions --all-domains

From the root as root, it found it and changed it to the right settings

Thanks

hello,
What does this command do. I ran it, it said it ran, then I ran it with single domain option and subserver, it said it didn’t find the domain. So how do I know it did what it is supposed to do, and how do I find what it actually does, where do I find it.

I struggled with this command. On one virtual server, it didn’t work the first time. I tried again, and this time it worked. On another server, it didn’t work at all.

In the end I used this command:

find /home/site/public_html -type d -exec chmod 755 {} \;

Reference:
https://vander.host/knowledgebase/operating-systems/change-permissions-on-a-directory-and-all-subdirectories-in-linux/