suexec

500 internal server Symfony on production, possibly due to PHPsuexec

痴心易碎 提交于 2020-01-11 11:57:12
问题 Running into a 500 internal server error on my subdomain installation of Symfony when I attempt to visit any modules. The server does have PHPsuexec installed on it. Does anybody know whats up? Otherwise it states that the symfony project is installed and it runs fine on my server. One glitch could be that on my server the directories have permissions 777 and all files have 666 permissions. However, courtesy of PHPsuexec, most my directories seem to have 775 and the files a 664 permission

Apache, FastCGI - Error 503

删除回忆录丶 提交于 2019-12-25 05:21:45
问题 It was pointed out to me that my server is insecure, because anyone could read any file through PHP, even if it was out of his DocumentRoot. I decided to reconfigure whole apache and all configuration files for virtual hosts and installed Mod FastCGI and I managed to get it running quite nicely, I don't have problems with rights anymore. But there seems to be another problem. When I try to load more than 3 sites (on different VirtualHosts => different users on different threads) page loads

PHP let www-data run a command as if it were a different user

拜拜、爱过 提交于 2019-12-11 19:48:37
问题 So I want to execute the following command in my php script: exec("/path/to/command"); Because it is the www-data user who runs php scripts, i currently can not run this command. I have read something about suexec being able to run a command as if it was a different user. I find it rather difficult to understand how this works. I have already installed suexec and edited the /etc/apache2/suexec/www-data file and added: /home/user_to_run_command/script.php I have also edited /etc/apache2/sites

500 internal server Symfony on production, possibly due to PHPsuexec

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 06:29:40
Running into a 500 internal server error on my subdomain installation of Symfony when I attempt to visit any modules. The server does have PHPsuexec installed on it. Does anybody know whats up? Otherwise it states that the symfony project is installed and it runs fine on my server. One glitch could be that on my server the directories have permissions 777 and all files have 666 permissions. However, courtesy of PHPsuexec, most my directories seem to have 775 and the files a 664 permission level. Thanks all! Parijat My guesses would be: Check if you have enabled mod_rewrite and your htaccess

Apache ITK vs Suexec

自作多情 提交于 2019-11-30 02:36:35
问题 What is the benefit of using ITK module instead of Suexec running Apache server? The idea is the same, which is to run scripts with owner privileges instead of nobody , www or apache ! Is it better to use ITK in favor of suexec ? If so, why? What about security and performance in comparison? 回答1: MPM-ITK allows you to run Apache with per-user credentials instead of under the Apache user/group. Suexec runs scripts as CGI under a specific user/group, but the static files served by Apache still

Completely removing phpMyAdmin [closed]

☆樱花仙子☆ 提交于 2019-11-29 20:17:56
I installed virtualmin and phpmyadmin separately using the apt-get command. phpMyAdmin didn't work because of Virtualmin's security settings (suexec). When I visit mydomain.com/phpmyadmin, it would download the whole PHP page instead of execute it. I tried disabling suexec but it didn't work. So now I want to remove phpMyAdmin. I removed it using the apt-get remove command and also deleted the /etc/phpmyadmin folder. But still, when I visit mydomain.com/phpmyadmin, it downloads the page. It probably means phpmyadmin wasn't completely deleted. What is the problem? Please help. Try running these

How to successfully run Perl script with setuid() when used as cgi-bin?

浪子不回头ぞ 提交于 2019-11-29 11:40:41
I have a Perl script that is called either via Apache or on the command-line. For testing purposes, I pass it the username I want the Perl script to operate with, and use POSIX::setuid to set the uid . If I run the script from the command line, then the uid is set properly: use CGI::Pretty qw/:standard/; use POSIX qw(setuid getuid); ... my ($pwName, $pwCode, $pwUid, $pwGid, $pwQuota, $pwComment, $pwGcos, $pwHome, $pwLogprog) = getpwnam($username); if ((defined $pwUid) && (getuid() == $pwUid)) { setuid($pwUid); print header; print Dumper $<; } else { print header(-status => 401); print "Could

Completely removing phpMyAdmin [closed]

大城市里の小女人 提交于 2019-11-28 16:48:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I installed virtualmin and phpmyadmin separately using the apt-get command. phpMyAdmin didn't work because of Virtualmin's security settings (suexec). When I visit mydomain.com/phpmyadmin, it would download the whole PHP page instead of execute it. I tried disabling suexec but it didn't work. So now I want to

How to successfully run Perl script with setuid() when used as cgi-bin?

别来无恙 提交于 2019-11-28 05:23:45
问题 I have a Perl script that is called either via Apache or on the command-line. For testing purposes, I pass it the username I want the Perl script to operate with, and use POSIX::setuid to set the uid . If I run the script from the command line, then the uid is set properly: use CGI::Pretty qw/:standard/; use POSIX qw(setuid getuid); ... my ($pwName, $pwCode, $pwUid, $pwGid, $pwQuota, $pwComment, $pwGcos, $pwHome, $pwLogprog) = getpwnam($username); if ((defined $pwUid) && (getuid() == $pwUid))