Re: print() on closed filehandle error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, September 20, 2008 5:29 am, mk27 wrote:
> I notice that I can't overwrite or append anything existing in
> /var/www/html from a cgi script in /var/www/cgi-bin, regardless of
> permissions and ownership.  I presume this is blocked by apache.  What
> can I do to reconfigure this?

As far as I know, permissions and ownerships are all that can be involved
here.  By default, apache is usually configured to handle requests as a
user with minimal privileges, e.g. "nobody" or "www".  By design this user
typically does not have any privileges to change files in /var/www/html
(or much of anywhere else) to minimize the damage that could be done if
a security bug in apache allowed the child process to be compromised.

Anyway, there are several ways you can handle this.

1) (most common) store your data in a database instead of in
the file system.

2) use suexec to run your CGI as another user

3) change the permissions on some files so the apache user can
modify them

4) change the user that apache runs as.

-- 
Dan Poirier <poirier@xxxxxxxxx>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux