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

OC7.0.3 mtime of config.php is changing unexpected #12135

Closed
ghost opened this issue Nov 12, 2014 · 3 comments · Fixed by #12139
Closed

OC7.0.3 mtime of config.php is changing unexpected #12135

ghost opened this issue Nov 12, 2014 · 3 comments · Fixed by #12139
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Nov 12, 2014

Steps to reproduce

  1. upgrade from 7.0.2 to 7.0.3 via yum on centos 6

Expected behaviour

owncloud/config/config.php
should have a modification date of the last modification

Actual behaviour

the time of the file is updated continuously!

Server configuration

Operating system:
CentOS release 6.6 (Final)
updated

Web server:
httpd-2.2.15-39.el6.centos.x86_64

Database:
mysql-5.1.73-3.el6_5.x86_64

PHP version:
php-5.3.3-40.el6_6.x86_64

ownCloud version: (see ownCloud admin page)
owncloud-7.0.3-11.1.noarch

Updated from an older ownCloud or fresh install:
update from 7.0.2

List of activated apps:

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '526e3ab52dd4d',
  'dbtype' => 'mysql',
  'version' => '7.0.3.4',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => '',
  'installed' => true,
  'forcessl' => true,
  'maxZipInputSize' => 0,
  'allowZipDownload' => true,
  'theme' => '**',
  'maintenance' => false,
  'trusted_domains' => 
  array (
    0 => '**',
  ),
);

Behavior Log:

 while true ; do ls -la --full-time config.php ; sleep 1 ; done
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:41.265079769 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:29:54.536075944 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:01.471075236 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:01.948074675 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:01.948074675 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:04.314074211 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:04.314074211 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:04.314074211 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:07.285073586 +0100 config.php
-rw-r----- 1 apache apache 555 2014-11-12 15:30:07.285073586 +0100 config.php

@LukasReschke
Copy link
Member

Related line of code:

if($file === $this->configFilePath && !@touch($file)) {

@LukasReschke LukasReschke self-assigned this Nov 12, 2014
@LukasReschke LukasReschke added this to the 2014-sprint-08-current milestone Nov 12, 2014
LukasReschke added a commit that referenced this issue Nov 12, 2014
The permissions are already catched properly on the installation so we just have to check whether the file is readable to prevent fatal errors from happening.

Fixes #12135
@LukasReschke
Copy link
Member

@dor4711 Thanks for reporting issues back! - Can I ask you to test the change at #12139 and report back at the Pull Request if it solves your issue?

Thank you!

@ghost
Copy link
Author

ghost commented Nov 12, 2014

OK it works.

@ghost ghost closed this as completed Nov 12, 2014
LukasReschke added a commit that referenced this issue Nov 25, 2014
The permissions are already catched properly on the installation so we just have to check whether the file is readable to prevent fatal errors from happening.

Fixes #12135

Conflicts:
	lib/private/config.php
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants