Using Apache with Suexec on Linux
Executing CGI Scripts as Other UsersThe Apache Web server, like most if not all of the others in common use today, lets you execute arbitrarily complex operations through the use of CGI scripts. These can involve database lookups, system administration functions, real-time control of machinery, online payments, or almost anything else you can think of.
Ordinarily, all of these things occur in the context of the user
running the Apache server itself (typically
on Linux systems). This is fine when you're using a system that
is owned and used by a single entity...but what if you're an
ISP with multiple companies being hosted on your system? Or an
educational institution with faculty who want to be able to
execute their own scripts? Either everything has to be accessible
to the Apache
nobody user, or you have to run
multiple instances of Apache on multiple ports and IP addresses,
one of each per user,
with the concomitant confusion of configuration files.
rootand only changes to
suexec (pronounced 'SUE-ex-Ek')
tool helps make this possible. It's found in the
src/support/ directory under your Apache source tree.
Assumptions in This Article
For the rest of this article, I'm going to make the following assumptions:
- your Apache source tree starts at
- your Apache ServerRoot is
- your Apache DocumentRoot is
- the username under which Apache runs (the value of the
Userdirective in your
All of the
cd and other shell commands in this article
that refer to directories use these locations.
- Skip Ahead
- 1. Executing CGI Scripts as Other Users
- 2. Executing CGI Scripts as Other Users
- 3. Executing CGI Scripts as Other Users
- 4. Executing CGI Scripts as Other Users
- 5. Executing CGI Scripts as Other Users
- 6. Executing CGI Scripts as Other Users
- 7. Executing CGI Scripts as Other Users
- 8. Executing CGI Scripts as Other Users
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Dumps SPARC, Ubuntu Takes Over Linux 3.13 and the Core Infrastructure Initiative