← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1708665] Re: prerotate.sh fails due to no shell for www-data user

 

** Also affects: awstats (Ubuntu Artful)
   Importance: Undecided
       Status: New

** Also affects: awstats (Ubuntu Xenial)
   Importance: Undecided
       Status: New

** Also affects: awstats (Ubuntu Zesty)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1708665

Title:
  prerotate.sh fails due to no shell for www-data user

Status in awstats package in Ubuntu:
  Triaged
Status in awstats source package in Xenial:
  Triaged
Status in awstats source package in Zesty:
  Triaged
Status in awstats source package in Artful:
  Triaged

Bug description:
  This was found in Ubuntu 16.04. I have not tested other versions.

  The /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh script does
  not run by default, because the 'www-data' user does not have a valid
  shell by default.

  root@www:~# bash -x /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh
  + UPDATE_SCRIPT=/usr/share/awstats/tools/update.sh
  + '[' -x /usr/share/awstats/tools/update.sh ']'
  + su -l -c /usr/share/awstats/tools/update.sh www-data
  This account is currently not available.

  We could give www-data a valid shell but my preferred fix is to edit
  /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh and explicitly
  specify the shell with '-s /bin/bash':

  
  diff -u ~/prerotate.sh /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh
  --- /root/prerotate.sh  2017-07-31 17:07:43.749559681 -0500
  +++ /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh       2017-07-31 17:07:54.122034426 -0500
  @@ -2,5 +2,5 @@
   UPDATE_SCRIPT=/usr/share/awstats/tools/update.sh
   if [ -x $UPDATE_SCRIPT ]
   then
  -  su -l -c $UPDATE_SCRIPT www-data
  +  su -l -c $UPDATE_SCRIPT -s /bin/bash www-data
   fi

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/awstats/+bug/1708665/+subscriptions