What to do when you’re trying to get someone onto decent hosting, and budget crap stands in the way.
NoDaddy.
Dealing with a client we’re trying to move off their meh infrastructure onto our omgwtfbbq infrastructure.
Problem is, I can’t migrate their docroots. Well, I can grab most of the docroots – but curiously, there’s a number of files which are owned by apache:apache and -rx to anything but, wull, Apache.
The virtual server in question has no root access, no sudo, and no way to configure either through their control panel. Last time I had the misfortune of dealing with GoDaddy’s support… Let’s just say, I don’t have three days for another non-resolution.
What to do? Wull, it is a Drupal site…
<?php
system('/bin/chmod -R go+rx /path/to/files', $retval);
?>
This happily worked, because everything I needed to mess with was owned by the Apache user, so Apache itself had no problems smacking permissions around.
This pointedly wouldn’t have worked if a different user (root, for example) had ownership of those files. But never underestimate the power of a single call to system() and the weird headaches it might solve.