0

I'm having an issue with AWStats updating its temporary database. I have the call to update the reporting database every hour through launchd, which runs as root. The perl scripts are called, and nothing gets updated. Troubleshooting demonstrated the following warning:

Warning: Failed to rename "/tmp/awstats082013.food.tmp.1641" into "/tmp/awstats082013.food.txt". Write permissions on "awstats082013.food.txt" might be wrong or file might be opened.

The permissions on that file is 777. The permissions on /tmp are also 777. Why AWStats cannot modify that file is really the question. I can do this manually using sudo, but the bash script that is run hourly by launchd shouldn't have to take the sudo -A, nor does it work.

Any advice as to how I can push through this, is appreciated.

8
  • or file might be opened. Close Apache, the file is in use, other than that try chown www-data:www-data tmp Commented Aug 5, 2013 at 22:28
  • By what? AWStats is the executable that created it. It's trying to write to the file it has created itself. That's what an update does.
    – Rich_F
    Commented Aug 5, 2013 at 22:32
  • thought you was using the frontend of awstats, php. ,my bad didn't read fully. Commented Aug 5, 2013 at 22:45
  • Actually using both. You can use the perl directly to update the stats, or a link that does the same. Same permissions warning in both instances. AWStats creates that temp db of its own in both cases, and I have no clue why.
    – Rich_F
    Commented Aug 5, 2013 at 22:47
  • Solved: set ownership to root:admin and "sodo launchctl load item.plist". Ya mon. Very happy.
    – Rich_F
    Commented Aug 6, 2013 at 2:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.