fix permissions script - for suPHP and FastCGI

Hi Eric / Virtualmin team,

Is it possible you could take a look at this script, and see if you could test adding it to Virtualmin GPL , because I had a serious issue a few months ago (I posted about it here) regarding rebooting my VPS and getting 403 errors on the main site. It’s still doing that. Have to restart apache2 just after boot up.

When people switch their PHP handler from DSO, CGI or, to suPHP ot to FastCGI , this permissions issue can rear its head and cause 403 or 500 errors. Luckily, this script is supposed to fix it by resetting permissions on all files in all web directories on the server…

it needs to be modified to call virtualmin scripts (instead of cpanel scripts) for enumerating through all the web directories and web users…

It would be great if you could see if this script would solve permissions issues


Well, file and directory permissions shouldn’t ever be reset upon reboot… so something unusual is going on there :slight_smile:

However, we do occasionally run into folks looking to reset permissions for one reason or another. It came up often enough that Jamie recently added an option into Virtualmin to handle that.

It’s not currently something that can be run from the command line (though that functionality may be added in the future).

It can be accessed from within Virtualmin by going into Limits and Validation -> Validate Virtual Servers -> Fix Permissions. In that screen, you can reset the permissions for some or all Virtual Servers on your system.