Bug Report: awstats / username change

hostpc.com

Verified User
Joined
Aug 2, 2003
Messages
1,055
Location
Schenectady, NY
Just discovered a bug in a DA script, which is easy enough to fix - and not a security issue

When a username on the system is changed via /usr/local/directadmin/scripts/change_username.sh - data in /home/newusername/domains/DOMAIN.com/awstats/.data/awstats.DOMAIN.com.conf isn't changed properly to reflect the new username.

There are two places where this needs to be changed in that file:

Code:
# When AWStats updates its statistics, it stores results of its analysis in 
# files (AWStats database). All those files are written in the directory
# defined by the "DirData" parameter. Set this value to the directory where
# you want AWStats to save its database and working files into.
# Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser"
# feature (see later), you need "Write" permissions by web server user on this
# directory (and "Modify" for Windows NTFS file systems).
# Example: "/var/lib/awstats"
# Example: "../data"
# Example: "C:/awstats_data_dir"
# Default: "."          (means same directory as awstats.pl)
#
DirData="/home/NEWUSERNAME/domains/DOMAIN.com/awstats/.data"


and

Code:
# Relative or absolute web URL of your awstats icon directory.
# If you build static reports ("... -output > outputpath/output.html"), enter
# path of icon directory relative to the output directory 'outputpath'.
# Example: "/awstatsicons"
# Example: "../icon"
# Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon")
#
DirIcons="/home/NEWUSERNAME/domains/DOMAIN.com/awstats"


Should be a simple enough change in the next bugfix release - but until then, some might need to be aware of this error and make the changes manually.

This has been submitted to Directadmin Mar 2, 2009.

Thanks

Joe
 
Hello,

Thanks, I've added code to swap /home/user with /home/newuser in awstats conf files in the change_username.sh. Available for the next release.

John
 
Back
Top