Weird, whatever I try to do I end up with php files not working correctly. I get asked to save them instead. I did try suphp first, as that did not work though I tried normal php4 and normal php5... none seem to work at all. Any ideas?
#!/bin/sh
cd /home
for file in *
do
if cd /home/$file/public_html; then
echo $file;
chown -R $file:$file * .*
for i in $( find . -name "*.php" ); do chmod 644 $i; done
for i in $( find . -type d ); do chmod 755 $i; done
fi
done
I see where you have one script that should work for this. I don't know if my script is any better, but I do have a script that does do such a thing at:intel352 said:right now i'm trying to work up a small sh script that i can run to change permissions for user's files (to preempt any permission/security issues)
I have used hardened-php in the past but it always broke the Zend Optimizer (I think), so I stopped using it. I'm not sure if this is still the case or if this is referring to something different. If its just a PHP patch, then you should be able to apply the patch to the PHP source before you compile it.intel352 said:btw, if you could consider adding support for the Suhosin patches from hardened-php.net, that would be awesome. Suhosin is binary compatible, so it no longer breaks things like the normal hardened-php patch would.
http://www.hardened-php.net/suhosin.127.html![]()
Suhosin comes in 2 parts that can be used separately or together. 1 part is a patch that is applied to remove some insecurities at a low level, the other part is essentially the hardened-php old-style patch, but now written as an extensionsparek-3 said:I have used hardened-php in the past but it always broke the Zend Optimizer (I think), so I stopped using it. I'm not sure if this is still the case or if this is referring to something different. If its just a PHP patch, then you should be able to apply the patch to the PHP source before you compile it.
I glanced over the howto.. it's nicely written, but you're making some compromises which could be disasterous.sparek-3 said:I finally got around to writing a guide for using suPHP on CPanel. I had to find my old notes for making it work, and I did go ahead and make a patch for the necessary modifications.
The guide is available at:
http://www.spareknet.org/howtos/suphp.php
Please note, this is completely outside of CPanel. It does not use the easyapache2 script and only applies for Apache 1.3. But maybe someone will find it useful.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
C | Php-fpm & cgi vs suPHP | Web Servers and Applications | 3 | |
M | DSO and suPHP for php5? | Web Servers and Applications | 1 | |
T | suphp php4+php5 | Web Servers and Applications | 0 | |
B | SuPHP+PHP5+Apache 2.0 | Web Servers and Applications | 2 | |
W | MIMETypes/AddHandler Apache2, suPHP and PHP5 | Web Servers and Applications | 6 |