Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading log message in logfile after setup: touch() unabe to create file owncloud.log #12893

Closed
RandolfCarter opened this issue Dec 16, 2014 · 11 comments

Comments

@RandolfCarter
Copy link
Contributor

Steps to reproduce

  1. Set up a new owncloud installation
  2. Check the owncloud.log

Expected behaviour

No log entries, or at least none indicating any problem if everything went ok.

Actual behaviour

Even if everything went perfectly, there is a message stating that the log file could not be written (in the logfile itself) - quite the paradox ;) (see below for message).
Also reported here: https://forum.owncloud.org/viewtopic.php?f=21&t=25393

Server configuration

Operating system: Ubuntu Server 14.04.1 LTS
Web server: Apache 2.4.9 (Ubuntu)
Database: MariaDB 10.0.14
PHP version: 5.5.9
ownCloud version: 7.0.3 / 7.0.4
Updated from an older ownCloud or fresh install: fresh install

List of activated apps:
default apps from community edition

The content of config/config.php:
Pristine config.php as written by setup

Are you using external storage, if yes which one: none

Are you using encryption: no

Client configuration

(among others):
Browser: Firefox 34.05
Operating system: Windows 8.1

Logs

Web server error log

nothing related

ownCloud log (data/owncloud.log)

{"app":"PHP","message":"touch(): Unable to create file \/www\/owncloud\/data\/owncloud.log because No such file or directory at \/www\/owncloud\/lib\/private\/log\/owncloud.php#49","level":3,"time":"2014-11-19T18:36:08+00:00"}

Browser log

nothing relevant

@karlitschek
Copy link
Contributor

@icewind1991 What do you think?

@DeepDiver1975
Copy link
Member

while this is not really meaningful - not really a critical issue. let's have a look at this some point in time.

@RandolfCarter
Copy link
Contributor Author

I agree that it's not important, just wanted to have it documented. Maybe a junior job? Or maybe I'll get around to look into this myself at some point ;)

@Redbot
Copy link

Redbot commented Feb 17, 2015

I fixed it by moving the log file off of my external drive.

in config.php,

'logfile' => '/var/www/owncloud/log/owncloud.log',

chown www-data:www-data to the log directory as well.

I believe this may be due to "touch" returning permission denied on external drives. Moving to an internal drive fixed the problem.

@l3iggs
Copy link

l3iggs commented Mar 23, 2015

I'm seeing this issue. I'm not using an external drive.

@mobamoba
Copy link

mobamoba commented May 9, 2015

The solution is to create a "data" directory within your Windows owncloud directory. For whatever reason, that directory doesn't exist but it's the directory where Owncloud expects to find the log.

@ghost ghost mentioned this issue Jun 2, 2015
@ghost
Copy link

ghost commented Jun 2, 2015

If someone is taking over to debug this note the recent discussion/comments in #15992

@extide
Copy link

extide commented Jun 19, 2015

I am also seeing this issue, it seems to happen when I have any logging settings (like log type or log file) in the config.php -- if I just remove them entirely (so as to use the defaults) it seems to work -- most of the time at least.

@MorrisJobke
Copy link
Contributor

This error is gone, but there is now a new one - see #13736

LukasReschke added a commit that referenced this issue Jan 26, 2016
When installing ownCloud the first time the first thing that an admin saw was an error message:

> Error   PHP   touch(): Unable to create file owncloud.log because Permission denied at /var/www/owncloud/lib/private/log/owncloud.php#48

Or something related. This lead to a lot confusion as can be seen in our forum and in our issue tracker. This change should make the error messages disappear in most cases (e.g. where the file can actually be written). To test this:

1. On master install ownCloud and check owncloud.log => Error message
2. On this branch install ownCloud and check owncloud.log => No error message

Fixes #13736 and #12893
@MartinMajewski
Copy link

Seeing this issue as well on my Qnap TS453S Pro with MariaDB and owncloud installed from AppCenter repository

@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants