Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have re-written the recursive_chmod-like functions so that they don't call system(). I had a weird issue here where chmod -R would yield lots and lots of permission errors that would just eat up memory in PHP (because it fills the $output variable with it).
Now I have made a generic, recursive function that we can use to extend to even more than chmod/chown/chgrp (chattr?).
Here's a diff: http://git.koumbit.net/?p=drupal/modules/provision/.git;a=commitdiff_pla...
Comment | File | Size | Author |
---|---|---|---|
#1 | recursive.patch | 2.1 KB | anarcat |
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedActually, that diff was crap, here's a better patch. I also realised this has the added bonus that it will tell you what the error is as a warning, while chmod -R will not. An example I had here:
aaaaaah! i seee!!!! ;)
This would have been totally hidden by the system call. Now we can even build a list of files that fail and things like that...
I am now using this in production.
Comment #2
anarcat CreditAttribution: anarcat commentedCommitted to CVS.