[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: apache account to run cronjob ?



On Thu, Jun 02, 2005 at 11:13:39AM -0700, M E Fieu wrote:
> Hi.. In FC, I need to generate some data using cron
> job and display on the web page. I use root to run
> cron job and generate the data and those file are of
> rwxr-x-r-x so the apache user can execute and display
> it on the web.
> 
> But because of the senstivity of those data, I used
> .htaccess method to protect the web folder. But
> because those file are in rwxr-xr-x, any non-user can
> login in to the box can still read it.  
> 
> How to settle this issue.  Use apache to run cron job
> to generate those file ? But my apache user account
> has no shell configured. /bin/nologin  I need to
> enable its shell ?

If you're already running the cron job as root, why not change the
ownership of the files you create to apache and set them read/write only
by apache?

  chown apache.apache file1 file2 ...
  chmod 0600 file1 file2 ...

-chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]