Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
    
or file might be opened. Close Apache, the file is in use, other than that try chown www-data:www-data tmp –  bybe Aug 5 '13 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 Aug 5 '13 at 22:32
    
thought you was using the frontend of awstats, php. ,my bad didn't read fully. –  bybe Aug 5 '13 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 Aug 5 '13 at 22:47
    
Solved: set ownership to root:admin and "sodo launchctl load item.plist". Ya mon. Very happy. –  Rich_F Aug 6 '13 at 2:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.