Questions tagged [suexec]
The suexec tag has no usage guidance.
97
questions
16
votes
2
answers
22k
views
Multiple php versions simultaneously on Ubuntu
I want to be able to run multiple php versions on my development box running Ubuntu 12.04. What I want to accomplish is that when I use localhost as a domain a default is used (let's say php 5.3.17). ...
13
votes
1
answer
3k
views
Apache, suexec, PHP, suPHP
While I'm quite comfortable as a Linux user, my Linux Admin-fu is a bit weak. Thus, I'm here looking for guidance with a CentOS server I'm about to build.
I need to setup an Apache2 web server for a ...
9
votes
4
answers
33k
views
PHP fopen always fails with permission denied
I am in the process of migrating a couple of Wordpress blogs over to AWS and have run into an issue with file permissions that has successfully foiled me for the last couple of hours.
The simplest ...
7
votes
4
answers
19k
views
How to change suexec root directory from "/var/www" to "/home"?
Hi I've installed suexec using on ubuntu 12.04:
apt-get install apache2 apache2-suexec libapache2-mod-fcgid php5-cgi
However when I run the following command:
sudo /usr/lib/apache2/suexec -V
I get ...
5
votes
1
answer
730
views
Environment variables not available on server after mod_rewrite, but works locally
I am working on a site where I am using SSI to set a variable on an HTML page that gets parsed and the variable is then to be picked up by a script after a mod_rewrite rewrite. This works on my local ...
4
votes
3
answers
11k
views
multiple mounts of same NFS share on one client?
I'm moving webspace content to NFSv3 shares. Because of suexec restrictions I have different paths to different subsets of the content on the client. I wonder if I can still have all of the content in ...
4
votes
4
answers
10k
views
SuExec: “command not in docroot” Even Though It Is?
Arch Linux 2011.08.19 (Linux 3.4.2 i686)
Apache 2.2.22 with SuExec
PHP 5.4.4 (cli) via FastCGI
My sites were all working fine earlier… I’m not sure when it happened because I noticed it over a week ...
4
votes
1
answer
3k
views
How do I run a PHP web application as a particular user and group on CentOS 5 with Apache?
I'm aware there are various different ways to do this but I'm not sure that the "best" way would be for my particular situation:
Each site should have its own user account (site user)
Virtual Hosts ...
4
votes
1
answer
1k
views
Apache mass virtual hosting & suexec & fcgid
I followed Falco's tutorial and everything now works as expected for 2 users (e.g. john and alice) with their relevant directories (/var/www/john and /var/ww/alice).
Now, I want to go to the next ...
4
votes
2
answers
277
views
Configuring Apache for multiple clients
Last week I had a question here about suexec / suphp but I tried to accomplish too much. I'm going to narrow the scope a bit and try again.
I'd like to configure a LAMP server to host multiple ...
4
votes
1
answer
2k
views
Confusion on SUEXEC and DOCROOT
I keep running into an issue with suexec where it says the cgi script is not in the docroot.
I get this error:
"[2012-05-21 04:53:02]: command not in docroot (/apps/dctools/www/cgi-bin/test.cgi)"
...
3
votes
1
answer
20k
views
Setting up Apache 2.2 + FastCGI + SuExec + PHP-FPM on Centos 6
I'm trying to follow this very detailed instruction here, I simply changed from www-data user to apache user, and is using /var/www/hosts/sitename/public_html instead of /home/user/public_html
...
3
votes
1
answer
10k
views
NameVirtualHost 12.345.67.89:443 has no VirtualHosts after enabling and disabling suexec module
In the process of trying to enable suexec module I starting getting these warnings (when I restarted apache). I get them when suexec is enabled & disabled:
* Restarting web server apache2
[Wed ...
3
votes
2
answers
15k
views
Access Denied for PHP Files Only
Apache HTTP Server 2.2.21 with VirtualHosts under SuExec
PHP 5.3.8 via fcgid
Arch Linux 2011.08.19
I am getting 403 Access Denied errors from Apache any time I try to access a PHP file. HTML files ...
3
votes
1
answer
754
views
Suexec, group-writeable files
I am running an Apache server with Suexec. However, I get an internal server error if I try to execute a CGI script that is group-writeable (if I chmod g-w , the script runs fine)
However, I want the ...
3
votes
1
answer
2k
views
issue with with suexec command when i try to initialise virtualmin on a pc with webmin installed and working
I am trying to initialise Virtualmin. After installing it via Webmin->Module->new module installation screen.
This is the message that I am getting in Webmin:
The Suexec command on your system is ...
2
votes
3
answers
2k
views
Security issues of running PHP scripts as the owner of the PHP file with suexec
I'm using suexec to ensure that PHP scripts (and other CGI/FastCGI apps) are run as the account holder associated with the relevant virtual host. This allows for securing each users' scripts from ...
2
votes
5
answers
213
views
How to run each site under a different user?
Let's say I have a server and a bunch of developers working on different sites(php and django) and I don't want the different developers to access each other's sites.
How should I go about ...
2
votes
1
answer
189
views
Why restricting Apache users from executing scripts?
When Apache users are allowed to executes bash scripts via PHP - why it's considered dangerous?
I understand that the users can traverse the whole file system and even see which additional users are ...
2
votes
3
answers
2k
views
fcgid, suexec, and userdir
I'm trying to set up per-user trac instances, using fcgid. The problem is that trac requires rw access to the trac instance, so I need the fcgi process to run under the respective user.
I have the ...
2
votes
1
answer
5k
views
suexec and docroot problem
I've got a problem with running a FastCgiServer under apache2. When I define a virtual host with a static fcgi server configured, I get an error from suexec:
command not in docroot (/var/www-blah/...
2
votes
2
answers
421
views
SuExec for Tomcat?
We're running a (cPanel/WHM based) server which contains mainly PHP applications. They are executed with the permissions of their owner with the suExec component of Apache.
We're looking into moving ...
2
votes
1
answer
2k
views
PHP-FPM SuExecUserGroup not working
I have installed php, apache, and fastcgi_handler by:
emerge dev-lang/php www-apache/mod_fastcgi_handler
I managed to make it work by updating the relevant lines in /etc/apache2/modules.d/...
2
votes
2
answers
2k
views
django + wsgi + suexec + userdir + apache?
I've got a django 1.1 website I want to run in wsgi (as that seems to be the recommended deployment on apache). I want it to run as the www user (apache is running as www-data). I would ideally like ...
2
votes
1
answer
698
views
Secure Apache PHP vhost configuration
I'm looking to secure some websites running under apache using suexec. At the moment php is executed with the user/group of the file being executed. This seems to me, not secure enough. It stops ...
2
votes
2
answers
431
views
Apache setup for multiple sites with common files
Just realised i posted this on stack overflow by mistake, so here it is in the correct place!
I have approx 50 sites that all use the exact same files other than CSS and IMAGES, i currently ...
2
votes
1
answer
260
views
Suexec PHP does not load php.ini
I'm using FastCGI with suEXEC for PHP on CentOS 7. My wrapper script looks as follows:
#!/bin/sh
PHPRC=/home/ben/etc/
export PHPRC
export TMPDIR=/home/ben/tmp/
exec /usr/bin/php-cgi -c /home/ben/etc/...
1
vote
2
answers
11k
views
Apache + SuExec + php-fpm - how to set them up?
I wonder if there is a good guide on how to setup Apache + SuExec + php-fpm? I have a server which I am going to use several separate website. So, I need php to be run as site-owner user. As I can see,...
1
vote
1
answer
608
views
How to download source, modify source, recompile and build .deb package?
I have to customize my Apache2 suExec module to ensure some special environment variables getting passed through suExec.
How to download the source code form Debian package apache2-suexec, modify ...
1
vote
1
answer
3k
views
Safest way to run bash script using PHP-FPM
I currently running a websever with Nginx+PHP-Fpm and each sites on its own username/GID. Then I have a bash script that I use to create new user along with other necessary stuffs. I know I can call a ...
1
vote
1
answer
4k
views
suexec policy violation: What were these guys up to?
Have just assumed responsibility for a new client's site. OS is Linux. They had a cgi-bin directory below document root.
I was looking at my error.log for an issue with a script and found a number ...
1
vote
2
answers
1k
views
PHP Include Always Fails
Apache HTTP Server 2.2.21 with VirtualHosts under SuExec
PHP 5.3.8 via fcgid
Arch Linux 2011.08.19
I am in the process of migrating from shared hosting to VPS. The code I had ran fine before the move ...
1
vote
2
answers
1k
views
I need clarification on Apache2, MPM-Worker, FastCGI, PHP5-fpm, suEXEC?
My current configuration is:
Apache2 + MPM-Worker AND FastCGI + PHP5-fpm (PHP 5.3.2) ON Ubuntu 10.04 LTS
I have a single pool of 2-5 processes running as a different user from that of the default ...
1
vote
1
answer
2k
views
mod_fcgid: error reading data from FastCGI server / 500 Internal Server Error
I've trying to set up an IIPImage server but the Images won't display:
https://oooledge.de/wisski_views/b719fd1ac3844863103c508912965b883443
First here are logs, configs, modules and permissions:
...
1
vote
1
answer
196
views
Suexec: invalid command error
I'm trying to set lighttpd with suexec, but something goes wrong on testing: when I try to launch something via suexec, it gives me in log:
[2017-10-08 00:23:24]: invalid command (/srv/http/main/...
1
vote
1
answer
1k
views
Apache suEXEC execute script on user dir basis?
Iam looking for a way to run a script with different users.
I dont want to hardcode the users in the config... and I found some information that it should be possible that the user goes to... lets say:...
1
vote
1
answer
1k
views
trac: "Internal server error (500)" with mod_fcgid and mod_suexec
I try to setup Trac on a shared server with shell access, SW is Trac 1.0.1, Python 2.6.6, Apache 2.2.15 with mod_fcgid and mod_suexec.
I've set it up following the instructions from the wiki of my ...
1
vote
1
answer
510
views
How to enable group-writable suexec-capable CGI scripts?
I have been asked to set up a shared webspace on our department webserver that may be accessed by multiple people and which might be running CGI or PHP scripts. The people maintaining the webspace ...
1
vote
2
answers
3k
views
Can't Get New Instance Of RT To Start
I am trying to transplant an instance of RT 4.0.1 (with local code customization) from a CentOS 4 server to a CentOS 6 server.
My problem appears to be that I can't get the fastcgi script to start.
...
1
vote
1
answer
852
views
Mechanism behind user forwarding in ScriptAliasMatch
I am following this tutorial to setup gitolite and at some point the following ScriptAliasMatch is used:
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-...
1
vote
2
answers
2k
views
mod_vhost_alias + suEXEC: auto selecting uid/gid
I'm trying to configure Debian 6.0.4 for massive shared hosting with PHP5.
Packages apache2-mpm-worker libapache2-mod-fcgid apache2-suexec are installed.
I successfully loaded mod_vhost_alias and ...
1
vote
2
answers
3k
views
Why the php-cgi wrapper script for php-fpm? (Using virtualhost and suexec.)
I just setup my server with Apache, FastCGI, and PHP-FPM. My question is regarding the /cgi-bin/ folder: is it really necessary to have a /cgi-bin/php-fpm wrapper for every single virtualhost that ...
1
vote
1
answer
1k
views
suexec error configuring mod_fastcgi with apache2.2.3 on centos
I've been following this blog post so that I can share APC opcode cache between PHP processes using FastCGI. Unfortunately I'm getting the following error when starting httpd:
Starting httpd: Syntax ...
1
vote
2
answers
802
views
Running APC with suEXEC
Our servers are currently setup to run PHP as DSO with suEXEC enabled. Is it possible for us to install APC in this setup?
Servers are CentOS 5.2 running with WHM/cPanel
1
vote
1
answer
2k
views
How to enable suexec for VPS using Plesk Panel?
I have tested on Plesk 9 and 10(preview version), but I couldn't find a way to enable suexec. The apache has loaded the suexec module, but it was not enabled. The OS is Centos 5.4. Any help will be ...
1
vote
2
answers
2k
views
Apache error with suEXEC only
When I enable suEXEC by following the tutorial here, I am able to get PHP to run over Apache in cgi mode, but when I start trying to use suEXEC I get a 403, and the following error appears in the ...
1
vote
1
answer
605
views
Apache 2.4 VHosts with FastCGI and suexec-custom
I have setup at my local machine Ubuntu 22.04 Apache 2.4 with suexec-custom.
In fact, this setup was working from Ubuntu 16 up to this update to 22.04.
I only load some modules, reload some other and ...
1
vote
0
answers
23
views
I restored a vhost under Webmin, now php script are executed as www-data
Under Webmin (Debian 8), I restored a vhost (without deleting the existing vhost), then I chose 'No' to the question "reallocate UID and GID", now the php scripts run as www-data, I would like the php ...
1
vote
1
answer
674
views
Apache RewriteRule for each User directory
I have two directories in each of my users' home folders: .html-data and .cgi-bin. The first one contains static (.html) files, the second one contains files for dynamic document generation.
Each ...
1
vote
0
answers
1k
views
SuExec with Apache2.4 + Php5.6 + mod_proxy_fcgi + php-fpm in Debian 8
I installed Apache2.4 + Php5.6 + mod_proxy_fcgi + php-fpm and other things like Mysql 5.5, Phpmyadmin and munin, no problem. Note: I activated also userdir and rewrite.
Now I want to have more ...