Re: [users@httpd] Ubuntu 22.04/Apache 2.4.58 can enable cgid, but not cgi

2025-05-18 Thread EML
On 18/05/2025 10:43, EML wrote: On 18/05/2025 02:29, Frank Gingras wrote: First, you are free to change the mpm to event by commenting out the LoadModule directive for prefork, and uncommenting the LoadModule directive for event.  You will want to stop using the mod_php DSO if you

Re: [users@httpd] Ubuntu 22.04/Apache 2.4.58 can enable cgid, but not cgi

2025-05-18 Thread EML
On 18/05/2025 02:29, Frank Gingras wrote: First, you are free to change the mpm to event by commenting out the LoadModule directive for prefork, and uncommenting the LoadModule directive for event.  You will want to stop using the mod_php DSO if you change to the event mpm, mind you. As f

[users@httpd] Ubuntu 22.04/Apache 2.4.58 can enable cgid, but not cgi

2025-05-17 Thread EML
This combination (22.04.2/2.4.58) defaults to mpm_prefork. I have a previous (working) Apache config which uses mod_cgid, and which sets 'CGIDScriptTimeout'. Since this is a non-threading prefork system, I've attempted to change 'CGIDScriptTimeout' to 'CGIScriptTimeout'. However, this doesn't w

Re: [users@httpd] Script behaving differently when run by Apache and when run from a shell by user www-data?

2024-01-24 Thread EML
13:47, Curry, Alan wrote: On 1/23/2024 3:58 PM, EML wrote: What's interesting here is that CGI appears to be doing something more complex than simply forking a process. The script which is the problem has an EUID of 0, so why can't it unmount a filesystem? Have I just messed up (proba

Re: [users@httpd] Script behaving differently when run by Apache and when run from a shell by user www-data?

2024-01-23 Thread EML
IMO suexec would be better suited to handle more sensitive operations such as unmounting. CGI is not an interactive shell, as you discovered. Calling a separate script with the suid bit might work too. But I don't need an interactive shell: I need a way to run a script as user www-data,

Fwd: [users@httpd] Script behaving differently when run by Apache and when run from a shell by user www-data?

2024-01-23 Thread EML
Let's take a step back - why are you unmounting from a cgi script? It's a one-time setup when a user configures a new system. Most of these users aren't shell-literate, so they configure by ticking boxes on a web page. The system is a VPS, so is actually a VM, which I hope isn't relevant.

[users@httpd] Script behaving differently when run by Apache and when run from a shell by user www-data?

2024-01-23 Thread EML
The CGI Howto page contains some basic information on how Apache actually runs a program, but is there any more detailed information anywhere? Specifically, I have a problem where a bash script runs as expected when run from an interactive shell by user www-data (this is Ubuntu). However, the