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

new files created in windows shares have timestamps in the future #32426

Closed
IngoEF opened this issue Aug 23, 2018 · 6 comments
Closed

new files created in windows shares have timestamps in the future #32426

IngoEF opened this issue Aug 23, 2018 · 6 comments

Comments

@IngoEF
Copy link

IngoEF commented Aug 23, 2018

Steps to reproduce

  1. create file in windows share from owncloud web gui or windows explorer
  2. file timestamp shown in owncloud is "in 2 hours"
  3. file timestamps shown in windows are correct

Expected behaviour

show correct file timestamps in owncloud

Actual behaviour

owncloud shows and works with wrong file timestamps

Server configuration

Operating system: CentOS 7.3.1611

Web server: Apache 2.4.6

Database: MariaDB 5.5.52

PHP version: 7.0.27
ownCloud version: 10.0.9.5

Updated from an older ownCloud or fresh install: updated from 9.x

Where did you install ownCloud from: yum repository

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed

No errors have been found.

The content of config/config.php:

$CONFIG = array (
'updatechecker' => false,
'instanceid' => 'oct50jc0rkfb',
'passwordsalt' => 'xxx',
'secret' => ''xxx,
'trusted_domains' =>
array (
0 => 'xxx.yyy.com',
1 => 'aaa.bbb.ccc.ddd',
),
'datadirectory' => '/data/owncloud/data',
'tempdirectory' => '/data/owncloud/uploadtemp',
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' =>
array (
'host' => '/var/opt/rh/rh-redis32/tmp/redis.sock',
'port' => 0,
),
'overwrite.cli.url' => 'https://cloud.xxx.com',
'dbtype' => 'mysql',
'version' => '10.0.9.5',
'dbname' => 'owncloud',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'ocdbuser',
'dbpassword' => 'xxx',
'logtimezone' => 'Europe/Berlin',
'log_rotate_size' => '52428800',
'installed' => true,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_from_address' => 'cloud',
'mail_domain' => 'xxx.com',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'xxx.yyy.de',
'mail_smtpport' => '25',
'mail_smtpname' => 'name',
'mail_smtppassword' => 'xxx',
'theme' => 'mo',
'loglevel' => 2,
'maintenance' => false,
'htaccess.RewriteBase' => '/',
'integrity.check.disabled' => false,
'ldapIgnoreNamingRules' => false,
'ldapUserCleanupInterval' => 30,
'trashbin_retention_obligation' => 'auto, 0',
);

List of activated apps:

Enabled:

  • activity: 2.3.7
  • comments: 0.3.0
  • dav: 0.3.2
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_pdfviewer: 0.9.0
  • files_texteditor: 2.2.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.0
  • market: 0.2.5
  • notifications: 0.3.4
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.3.1
  • user_ldap: 0.11.0
    Disabled:
  • configreport
  • encryption
  • external
  • files_sharing
  • files_trashbin
  • updatenotification
  • user_external

Are you using external storage, if yes which one: local/smb

Are you using encryption: no

Are you using an external user-backend, if yes which one: ActiveDirectory

LDAP configuration (delete this part if not used)

+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration | |
+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | REMOVED SENSITIVE VALUE |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | |
| ldapBase | REMOVED SENSITIVE VALUE|
| ldapBaseGroups | REMOVED SENSITIVE VALUE|
| ldapBaseUsers | REMOVED SENSITIVE VALUE|
| ldapCacheTTL | 30 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | |
| ldapExpertUsernameAttr | samAccountname |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | REMOVED SENSITIVE VALUE |
| ldapGroupFilterGroups | REMOVED SENSITIVE VALUE
|
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | group |
| ldapGroupMemberAssocAttr | member |
| ldapHost | REMOVED SENSITIVE VALUE
|
| ldapIgnoreNamingRules | |
| ldapLoginFilter | REMOVED SENSITIVE VALUE |
| ldapLoginFilterAttributes | |
| ldapLoginFilterEmail | 0 |
| ldapLoginFilterMode | 1 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayname |
| ldapUserDisplayName2 | |
| ldapUserFilter | REMOVED SENSITIVE VALUE
|
| ldapUserFilterGroups | REMOVED SENSITIVE VALUE |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | person |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| useMemberOfToDetectMembership | 1 |
+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Client configuration

Browser: Firefox 61.02 64 bit

Operating system: Windows Server 2012 R2

Logs

Web server error log

no concerning errors

ownCloud log (data/owncloud.log)

no concerning errors

Browser log

a) The javascript console log
b) The network log
c) ...

nothing applicable

I've checked the owncloud file timestamps in the database using the sql-statement:
MariaDB [owncloud]> select * from oc_filecache where path like '%Ingotest%';
with this result:
+---------+---------+--------------------------------------------------------------+----------------------------------+---------+--------------------------+----------+----------+------+------------+---------------+-----------+------------------+----------------------------------+-------------+-----------------------------------------------------------------------------------------------------+
| fileid | storage | path | path_hash | parent | name | mimetype | mimepart | size | mtime | storage_mtime | encrypted | unencrypted_size | etag | permissions | checksum |
+---------+---------+--------------------------------------------------------------+----------------------------------+---------+--------------------------+----------+----------+------+------------+---------------+-----------+------------------+----------------------------------+-------------+-----------------------------------------------------------------------------------------------------+
| 1546009 | 358 | temp/Ingotest.txt | 2ea96397f31384c14d79e86f752ddf45 | 1545942 | Ingotest.txt | 19 | 18 | 3 | 1534367184 | 1534367184 | 0 | 0 | 5b7479b020506 | 27 | |
| 1546013 | 157 | files_versions/SANITIZED/temp/Ingotest.txt.v1534367176 | 61267bded5f8db76a94240581cde1b1f | 1546012 | Ingotest.txt.v1534367176 | 9 | 3 | 0 | 1534359983 | 1534359983 | 0 | 0 | 1d288626e05555562175484bacd32131 | 27 |
+---------+---------+--------------------------------------------------------------+----------------------------------+---------+--------------------------+----------+----------+------+------------+---------------+-----------+------------------+----------------------------------+-------------+-----------------------------------------------------------------------------------------------------+
2 rows in set (2.30 sec)

mtime = storage_mtime:
Sekunden seit 1970: 1534367184
umgerechnet in Zeitangabe: 23:06:24, 15.08.2018

file timestamp in windows:
PS P:> get-item P:\temp\Ingotest.txt

Verzeichnis: P:\temp

Mode LastWriteTime Length Name


-a---- 15.08.2018 21:06 3 Ingotest.txt

The file timestamp shown in windows is correct.

There is a difference of 2 hours which only exists in the owncloud database and must be an error.

The difference impacts sync activities in the owncloud client, because users often work with unsynced file versions.

All time zone configuration options (Linux OS, PHP, and Windows) are set to "Europe/Berlin"

@DeepDiver1975
Copy link
Member

All time zone configuration options (Linux OS, PHP, and Windows) are set to "Europe/Berlin"

the owncloud server shall be operated using UTC ... please double check ...

@ownclouders
Copy link
Contributor

GitMate.io thinks the contributor most likely able to help you is @PVince81.

Possibly related issues are #3465 (Sharing files), #3949 (File sharing), #18283 (cant share already shared Files or Folders for new created users), #5417 (Ghosted shared file), and #10810 (create folders through share).

@IngoEF
Copy link
Author

IngoEF commented Aug 25, 2018

@DeepDriver1975
Thanks for the hint.
But: what do you mean with "the owncloud- server"?
is it OS-, PHP-, DB- or which configuration you are referring to?
Where do I find timezone setup instructions in a manual?

@IngoEF
Copy link
Author

IngoEF commented Aug 25, 2018

ownclouders comment has nothing to do with the point.
It is more than needless, time wasting and should be switched off.

@IngoEF
Copy link
Author

IngoEF commented Aug 25, 2018

Tried several setups now.
The only configuration which seems to influence the owncloud file timestamps is setting the Linux-OS timezone to UTC.
This -to me- is a bug, because it forces the whole system to show wrong timestamps.

@PVince81
Copy link
Contributor

@IngoEF you could set the timezone only for the Apache process. Basically PHP needs to run in UTC timezone.

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

No branches or pull requests

4 participants