Create non-jailed command for awstats viewing in DA

Version 1.361

Bugfix
Finished

As of 1.36.0, the awstats icon directory has been linked to: icon -> /usr/local/awstats/wwwroot/icon This will save 2 meg of space, per domain. When viewing your stats through apache, you'll see everything normally. When viewing through DA, because it's jailed, the icons will not show up. This fix is to add a custom command for awstats: CMD_AWSTATS such that it can view the icons outside of the jail (likely simply won't jail it, but will have very specific path checks to ensure it's safe) Note the jail is only skipped if the icons directory is in the path, the icons directory is a directory link, and that link points to: /usr/local/awstats/wwwroot/icon If any of the above is not true, the chroot will not be skipped. A workaround would be to remove the link in: /usr/local/directadmin/scripts/awstats_process.sh find: if [ ! -h $ICON ]; then rm -rf $ICON ln -sf ${AWSTATS}/wwwroot/icon $ICON fi Replace it with: if [ -h $ICON ]; then rm -f $ICON cp -Rp ${AWSTATS}/wwwroot/icon ${STATS_DIR} fi where you'd remove the ! character before the -h, remove the r from -rf, and remove the ln line.

Interested to try DirectAdmin? Get a 30-day Free Trial!