On Thu, 2005-12-01 at 13:13, Matt Hyclak wrote:
On Thu, Dec 01, 2005 at 01:07:20PM -0500, James Pifer enlightened us:
I need to enable some access to the httpd logs over ftp so they can be analyzed by another application to get a report. I used to do this on Windows NT before replacing the server with CentOS.
Thanks to help from another thread I have an ftp server enabled on the web server. I thought the easiest thing to do would be to create an id for the application to connect with, then provide a symlink to the logs in that generic user's home directory.
The problem is the logs are owned by root. How can I make them readable by this generic id without completely compromising security? Plus, as the logs rotate this id will still need access.
Any suggestions?
Have a cron job running as root that copies the necessary files someplace that your special id can get to, and chown them to the special id.
Serve this location via ftp.
Or, run the analyzer in the same cron job. Analog or webalizer might do what you need. If you have to combine logs from several machines you'll probably want to script ssh commands to pull them together first.