Error: awstats failed to create directory DirData

When trying to access awstat getting following error:

Error: awstats failed to create directory DirData (DirData=”/home/old_username/tmp/awstats”, CreateDirDataIfNotExists=1).

Setup (‘/home/new_username/tmp/awstats/awstats.domain.com.conf’ file, web server or permissions) may be wrong.

To resolve the error:

move /home/new_username/tmp to different name.

Run:

/scripts/runweblogs

Now access awstat.

If you are facing error while adding or removing IP’s you can chekc our post on Error: To add, edit, or remove IPs