FS#47343 - The link from /etc/webapps/owncloud/config to /usr/share/webapps/owncloud/config kills cron.php

Attached to Project: Community Packages
Opened by David Bartlett (davepb) - Saturday, 12 December 2015, 04:39 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 17 December 2015, 15:15 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The link from /etc/webapps/owncloud/config to /usr/share/webapps/owncloud/config stops /usr/share/webapps/owncloud/cron.php from working

Additional info:
* Owncloud 8.2.1 using Apache 2.4.17-4


Steps to reproduce:
Add a new cron job: sudo crontab -u http -e
Enter: */15 * * * * /usr/bin/php -f /usr/share/webapps/owncloud/cron.php > /dev/null 2>&1
On Owncloud Admin page change change cron to 'system cron'

cron job is never run.

run: 'sudo -u http php -f /usr/share/webapps/owncloud/cron.php' and an error message occurs about not having write privileges to config folder.

Only solution I could find was to remove the link /usr/share/webapps/owncloud/config and copy /etc/webapps/owncloud/config to /usr/share/webapps/owncloud/
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 17 December 2015, 15:15 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#38650 
Comment by Doug Newgard (Scimmia) - Saturday, 12 December 2015, 06:09 GMT
This looks a lot like  FS#38650 
Comment by David Bartlett (davepb) - Saturday, 12 December 2015, 10:02 GMT
It does look very similar.
The comments regarding the open_basedir and FollowSymlinks option in apache look interesting.

Later I will undo what I did do mine and try to follow these suggestions.

I will report back.
Comment by Doug Newgard (Scimmia) - Wednesday, 16 December 2015, 05:01 GMT
Ping?
Comment by David Bartlett (davepb) - Wednesday, 16 December 2015, 08:40 GMT
Apologies Doug. I've come down sick since last Saturday. I'll look into it as soon as I'm a bit better.
Comment by David Bartlett (davepb) - Thursday, 17 December 2015, 14:24 GMT
Hi

I reverted back to having config in the /etc/webapps/owncloud folder and symlink to /usr/share/webapps/owncloud/
I noticed in the Apache config that Owncloud configuration already provides "Options FollowSymLink". The configuration also has:
php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud/:/etc/webapps/owncloud:/dev/urandom"

I also noticed that the file /etc/php/php.ini only had the following:
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/

I changed this option to

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud/:/etc/webapps/owncloud/:/dev/urandom

and it fixed it.

This is my fault for not entering the open_basedir value in both files.

If I had followed the Arch Owncloud wiki for Nginx configuration I would have noticed this but I was following the configuration for Apache.

We can mark this as closed as it's not a bug.

Thanks.

Loading...