Web Servers on Unix and Linux - chmod, possible for php to write log, prevent visitors from read?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > December 2006 > chmod, possible for php to write log, prevent visitors from read?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author chmod, possible for php to write log, prevent visitors from read?
Jan

2006-12-15, 1:17 pm

I have a form writing values to a log, but the log is either 100%
visible to any visitor or it will not write at all.

Also any directory on the server is fully visible to everybody.

Can I prevent this, I do not want the directories and logs to be
visible for everyone surfing the web, and I do want the log to be
updated by form submits.

It works great on another server doing chmod 755, but not on this
server (Apache).

Mike

2006-12-15, 7:20 pm


Jan wrote:
> I have a form writing values to a log, but the log is either 100%
> visible to any visitor or it will not write at all.
>
> Also any directory on the server is fully visible to everybody.
>
> Can I prevent this, I do not want the directories and logs to be
> visible for everyone surfing the web, and I do want the log to be
> updated by form submits.
>
> It works great on another server doing chmod 755, but not on this
> server (Apache).


What is the owner and group permissions on the file in question? Can't
you just change that? Does the log have to be in the same "directory
tree" as the apache files?

patpro ~ patrick proniewski

2006-12-15, 7:20 pm

In article <1166209679.196839.161960@f1g2000cwa.googlegroups.com>,
"Jan" <janoleolsen@hotmail.com> wrote:

> I have a form writing values to a log, but the log is either 100%
> visible to any visitor or it will not write at all.
>
> Also any directory on the server is fully visible to everybody.
>
> Can I prevent this, I do not want the directories and logs to be
> visible for everyone surfing the web, and I do want the log to be
> updated by form submits.
>
> It works great on another server doing chmod 755, but not on this
> server (Apache).


what about the apache directive "deny", associated with a file name ?

something like this :

<FileMatch your-file-name>
Order allow,deny
Deny from all
</FilesMatch>


patpro

--
http://www.patpro.net/
Jan

2006-12-16, 7:20 pm

I've put this in .htaccess, and for chmod I've tried most combinations.

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>



patpro ~ patrick proniewski schrieb:

> In article <1166209679.196839.161960@f1g2000cwa.googlegroups.com>,
> "Jan" <janoleolsen@hotmail.com> wrote:
>
>
> what about the apache directive "deny", associated with a file name ?
>
> something like this :
>
> <FileMatch your-file-name>
> Order allow,deny
> Deny from all
> </FilesMatch>
>
>
> patpro
>
> --
> http://www.patpro.net/


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com