Re: how to enable CGI scripts to read /var/log/httpd/access_log ?

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

 



On Feb 12, 2008 12:51 AM, Bennett Haselton <bennett@xxxxxxxxxxxxx> wrote:
> At 04:02 PM 2/11/2008 -0700, Doug McNutt wrote:
> >At 14:19 -0800 2/11/08, Bennett Haselton wrote:
> > >My CGI scripts can read world-readable files when those files are under
> > /var/www, just not when the world-readable files are located anywhere else.
> >
> >That could be because some intermediate directory(s) don't have the
> >necessary x and r permissions for world. (And you might not like that.)
>
> Uhh... Yep.  That was it.
>
> [root@sls-ce3p12 ~]# ls -ld /var/log/httpd
> drwx------  2 root root 4096 Feb 10 05:53 /var/log/httpd
>
> Changing that to 755 made it possible for the CGI script to read the
> access_log file.  Thanks!
>
> Don't know why I didn't think to check that.  I guess I was thinking in
> terms of Windows where (I think) permissions on individual directories are
> not inherited to sub-directories.

This is not a matter of permission inheritance, which Unix doesn't
really have. If the process attempting to open the file doesn't have
the permission to read the directory it can't find out what it's inode
is, and thus can't read the file.

Krist

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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