[Pkg-owncloud-maintainers] Bug#799561: owncloud: wrong user check breaks cron job in certain configurations

Marc Dequènes (duck) duck at duckcorp.org
Sun Sep 20 11:40:54 UTC 2015

Package: owncloud
Version: 7.0.8~dfsg-1


The OC crontab script fails with the following error:
Console has to be executed with the same user as the web server is 
Current user: www-data
Web server user: root
Unexpected error!

The corresponding code in '/usr/share/owncloud/cron.php' is:
   $user = posix_getpwuid(posix_getuid());
   $configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . 
   if ($user['name'] !== $configUser['name']) {

Obviously the owner of a configuration file may be unrelated to the user 
operating the service.
If for example you want to restrict changes to the main configuration 
file for security reasons, you can make it root:www-data with rw:r:-.


Marc Dequènes

More information about the Pkg-owncloud-maintainers mailing list