On Fri, 2004-01-09 at 08:05, Carlton L. Whitmore wrote: > Ray, > I'm using the root user to access the file so rights aren't an issue. > I want to display the file thru a webserver. I'd like the page to > refresh so I can watch the activity coming in from my SonicWall router. > I don't mind watching all the activity coming in on that syslog file, > maybe later I can limit what is displayed.
Some how you want to get the permissions of the syslog file to those of your webserver so that you can display the file properly. You dont want you webserver having root access at all. I dont know off hand how to have syslog log to a file and change the permissions of that file. You might have to have cron running and copying that file to apaches doc_root and running that every 5 minutes or less. You would have a little php [perl,bash] run from root's crontab that would copy the file and change the permissions for you. That might be the easiest way to do it. -- Ray > > > > -----Original Message----- > From: Ray Hunter [mailto:[EMAIL PROTECTED] > Sent: Friday, January 09, 2004 8:46 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Display syslog file? > > > > On Fri, 2004-01-09 at 07:28, Carlton L. Whitmore wrote: > > I didn't make my last request very clear. I used lastlog as an > > example, but what I really want to do is open a syslog file (text > > file), that is coming in from a VPN box. > > That is easy enough to do if you have access to the syslog file. Most > syslog files are written by root so you need to have privileges to read > the file. You might want to check to see if syslogd will write and > change the file permissions. > > > I'd like to have it displayed live so I can scan it during the day. > > What is the best way to do this? Someone had suggested using cron, but > > > I'm very new to Linux and PHP so I would need some help with that. Any > > > help is appreciated, > > How do you want to display it? through a webserver or some other method? > > Do you want specific info from the syslog file(s). There are many syslog > files that you can look at. Be more specific. > > -- > Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php