Bug 1336423 - Logfile is empty
Summary: Logfile is empty
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: owncloud
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: James Hogarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-16 12:43 UTC by Daniel L.
Modified: 2016-05-16 14:55 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-16 13:37:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel L. 2016-05-16 12:43:26 UTC
Description of problem:
Logging is not working. The default logfile /var/lib/owncloud/data/owncloud.log is empty. Also setting a specific logfile in /etc/owncloud/config.php does not work (e.g. 'logfile' => '/var/log/owncloud.log',).

Version-Release number of selected component (if applicable):
owncloud-8.2.3-4.fc23.noarch
owncloud-httpd-8.2.3-4.fc23.noarch
owncloud-mysql-8.2.3-4.fc23.noarch

How reproducible:
Install owncloud. Set log level to 0, 1 or 2. Try to log in with false credentials.

Actual results:
The logfile is empty. Failed logins aren't logged for example.

Expected results:
There should be logged events in the logfile. Failed logins should be logged for example. As you can not determine failed logon attemps and ban users brute forcing logins this is a security issue.

Comment 1 Daniel L. 2016-05-16 13:00:08 UTC
Issue persists in owncloud-8.2.4-1.fc23: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6f479decc6

Comment 2 Daniel L. 2016-05-16 13:14:05 UTC
Logging works with 'log_type' => 'owncloud',

Comment 3 James Hogarth 2016-05-16 13:37:17 UTC
The logging we ship in Fedora as default is the syslog type:

https://doc.owncloud.org/server/8.2/admin_manual/configuration_server/config_sample_php_parameters.html

As per the upstream docs logfile is only used if log type us set to 'owncloud'

See our snippet here:

http://pkgs.fedoraproject.org/cgit/rpms/owncloud.git/tree/owncloud-config.php

If you want text logs to parse then, as you mentioned in c2, as per the upstream docs you need to set the log type to owncloud and then pick a writeable path by apache for logfile.

To get the logs out of syslog for owncloud from the shipped config:
journalctl -t ownCloud to get that syslog target, if rsyslog is running you could also filter against that.

Incidentally please only place negative karma on an update if there is a regression from the existing package (ie bug doesn't exist in existing) and not for something that happens in both versions.

Comment 4 Daniel L. 2016-05-16 13:52:40 UTC
Thanks for the reply. Sorry for the mistake. Can you push this information into a README or to the wiki?

Comment 5 James Hogarth 2016-05-16 14:00:15 UTC
(In reply to Daniel Laczi from comment #4)
> Thanks for the reply. Sorry for the mistake. Can you push this information
> into a README or to the wiki?

The README.fedora file we ship already has a section pointing out config.php and a link to the upstream docs:

http://pkgs.fedoraproject.org/cgit/rpms/owncloud.git/tree/owncloud-README.fedora#n47

It also has a specific logging section pointing out the syslog behaviour:

http://pkgs.fedoraproject.org/cgit/rpms/owncloud.git/tree/owncloud-README.fedora#n64

Comment 6 Daniel L. 2016-05-16 14:55:02 UTC
Thanks. I thought it was curious as it didn't display the logs in the web admin gui as well. Now I suppose that's normal behavior with syslog. But yeah, shame on me. I skipped the Logging section in docs and didn't check journalctl.


Note You need to log in before you can comment on or make changes to this bug.