Hi all,
Having a really bad time with this one.
Any help would be appreciated.

Last year I set up a Linux Mandrake 8.0 box
for a school and installed squid so all their
students machines went through it to the internet.
This has worked fine for over a year, never crashed
or any other problems.
Now their IT used to have to edit squid.conf manually
each time they found students had managed to get onto
a dubious site.
Now they have asked me to change things so they can
only access sites specifically allowed and no others.
They also asked if I could provide a simple web access
system so selected tutors could add or remove access to
sites without having to get IT to do the work.

Now I have 2 machines at home and so on one I set up
squid and apache. I wrote a set of web pages using php
to control them. The way it works is as follows:
Squid has 2 acls which point to text files. The tutors
thru the web pages can add or select for deletion any
site in the text files.
php opens the file for append if they are adding a site.
but if they are deleting a site then they select from
a drop down list the site they want to delete. How it
actually works is that the site they have chosen is
passed to a php script. This opens the file in read
mode, and a temporary file in write mode.
It reads each line in the first file and if it doesn't match
the parameter passed then it is written to the temporay file.
After all the file is parsed both are closed, then temp file
is opened for read and the original for write. the temp file
is read to the end and the original is overwritten by it's contents.
That way the new version of the original is created.
A further temporary file is created to signal to a cron job that
the file has been updated. The cron job does squid -k reconfigure
to make it look at the new config and then deletes the temp file.

Now the problem:
On either of my machines at home This works fine but
at the school it doesn't. Adding sites works from other PC's
( which are MS Windows PC's) but it will not delete the sites.
No error seems to be reported but the file does not change.
On the squid box it does all work.
I have suspected it might be some permissions problem
but try as I might I cannot find out what.
I have updated Linux to Mandrake 9.0 at the school and I have
fetched their squid.conf and put it on my machine.
Nothing has changed!!! it still works fine at home but not
at the school.

Unfortunately the school is 50 miles away so it would not
be easy to keep checking things although the IT people at
the school are so impressed with the robustness of this
PC compared to the Win box they used to use ( they said
it crashed at least once per day and sometimes more often)
that they have started to pick up some linux knowledge.

Help please before I finally go completely mad!!!


---
Noose & Head?
Lambs & Slaughter?
Lemmings & Cliff?
Link?
Oh, silly me, could it be  Microsoft Software users?:<)

http://www.nelliott.co.uk
registered Linux user 277766


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to