--- Darling Aron J <[EMAIL PROTECTED]> wrote:

> I have an nfs <ipaddy:/logs> that I mount on my test systems for backing up 
> logs.  I also have a simlink for /logs in my /var/www/html/logs.  Currently 
> there is a file <test.log> that I can see in the browser, but I can't read 
> it, nor download it.  It has 777 permissions on the server, is owned by 
> apache and belongs to the apache group.  I still cannot access the file.
> 
> Suggestions?
> 
> It is a CentOS 5.2 machine.
> 
> Thanks for any assistance you may be able to provide.
> 
> Aron 

When you say "I can see in the browser", do you mean the web browser?  If not,
what error are you getting from the web server in the browser?

Apache is granted limited access to specific parts of the filesystem to prevent
abuse.  If the location of this file is not covered by the DocumentRoot or
Alias directives in the Apache configuration, no permissions setting on the
file will do the job.

If you only want to access this one file through the web browser, you could
make a symbolic link in the directory (or a subdirectory) defined by the
DocumentRoot and point to the test.log file.  The permissions on the symlink
will carry over the permissions of the original file.

I know you were trying to do all you could to view the file but it is not a
good idea at all to have 777 on any file.  If you want it to be readable by any
user, use 644.  This way, it is writable by the owner but readable by the group
and other users on the system.

One thing you will notice when working with Apache permissions is that Apache
must have r-- access on the file and at least r-x access on each directory from
the top of the filesystem (/) to the directory which contains the file.  I've
seen people struggle with Perl CGI issues because one of the upper directories
is too restricted or the wrong owner.

James Keeline


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to