Moving files from external storage looses mappings like system tags and comments
Steps to reproduce
Tag a file on external storage and/or add comment to that file
Move the file to a "normal" folder
Check the file in new destination: tags and comments are gone
Expected behaviour
I expect the annotations to stay with that file.
Actual behaviour
The annotations like tags and comments do not stay with that file.
I guess the reason is that the file gets a new objectid at the new location.
What happens is, that the objectid from the old object gets moved to files_trashbin and a new object is created at the new location. The oc_systemtag_object_mapping stays the same, so I would expect these entries to be copied to the created object.
I do not remember when it changed, but a while ago there was another behaviour and tagging stayed with the files. I guess the files kept their objectid in the past and the issue came up with the (propably new) behaviour moving the old object to the trash and copying the entry to a new object at the target location?
It must have been somewhere around version 16 or 17 when the behaviour changed, I do not remember exactly.
The issue is very annoying, mostly because I only realized the change a while after, so many moved files were missing when searching for a tag even though I was sure I tagged them! Now that I now I tag my files after I moved them from the external storage (where my scanner saves them). This way one has to move the files to locations and afterward check every locations to tag the moved files. Tagging at the one source file and then moving the files is way more convenient!
I could not find any issues with this exact behaviour so far
Update 2020-09-27:
I just realized the same effect shows up when moving files to group folders, so not only external storage.
Tracking the problem
I tracked the problem:
Tag a file on external Storage (sftp)
Add a comment to that file (optional)
Move the file to new location
Open file at new location
annotations missing
Check Database for old objectid
objectid from file @ source still exists, moved to files_trashbin
Nextcloud version: (see Nextcloud admin page)
18.0.6
Updated from an older Nextcloud/ownCloud or fresh install:
Continuously Updated since 12.xx
Where did you install Nextcloud from:
Installed from Archive
Signing status:
Signing status
```
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
No errors have been found.
```
Web server error log
```
Nor Error log for the timestamp with
this error:
[Sat Sep 26 11:50:23.287415 2020] [access_compat:error] [pid 10657] [client 87.150.88.229:38202] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Sat Sep 26 11:52:37.444212 2020] [access_compat:error] [pid 10532] [client 87.150.88.229:41288] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
```
Nextcloud log (data/nextcloud.log)
Nextcloud log
```
Insert your Nextcloud log here
No log entries while tagging or moving files.
```
Browser log
Browser log
```
Insert your browser log here, this could for example include:
Browser Console Log
Navigating away, leaving conversation 9 FilesSidebarTabApp.vue:149
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. files
GEThttps://nextcloud.stuck.istmein.de/apps/maps/js/filetypes.js?v=7003d419-9
[HTTP/1.1 404 Not Found 34ms]
The resource from “https://nextcloud.stuck.istmein.de/apps/maps/js/filetypes.js?v=7003d419-9” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). files
Loading failed for the Githubissues.
Githubissues is a development platform for aggregating issues.
Moving files from external storage looses mappings like system tags and comments
Steps to reproduce
Expected behaviour
I expect the annotations to stay with that file.
Actual behaviour
The annotations like tags and comments do not stay with that file.
I guess the reason is that the file gets a new objectid at the new location. What happens is, that the objectid from the old object gets moved to files_trashbin and a new object is created at the new location. The oc_systemtag_object_mapping stays the same, so I would expect these entries to be copied to the created object.
I do not remember when it changed, but a while ago there was another behaviour and tagging stayed with the files. I guess the files kept their objectid in the past and the issue came up with the (propably new) behaviour moving the old object to the trash and copying the entry to a new object at the target location? It must have been somewhere around version 16 or 17 when the behaviour changed, I do not remember exactly. The issue is very annoying, mostly because I only realized the change a while after, so many moved files were missing when searching for a tag even though I was sure I tagged them! Now that I now I tag my files after I moved them from the external storage (where my scanner saves them). This way one has to move the files to locations and afterward check every locations to tag the moved files. Tagging at the one source file and then moving the files is way more convenient!
I could not find any issues with this exact behaviour so far
Update 2020-09-27: I just realized the same effect shows up when moving files to group folders, so not only external storage.
Tracking the problem
I tracked the problem:
Server configuration
Operating system: 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
Web server: apache2 2.4.38-3+deb10u3
Database: mariadb-server 1:10.3.23-0+deb10u1
PHP version: php 2:7.3+69
Nextcloud version: (see Nextcloud admin page) 18.0.6
Updated from an older Nextcloud/ownCloud or fresh install: Continuously Updated since 12.xx
Where did you install Nextcloud from: Installed from Archive
Signing status:
Signing status
``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed No errors have been found. ```List of activated apps:
Installed apps
``` - accessibility: 1.4.0 - activity: 2.11.0 - admin_audit: 1.8.0 - apporder: 0.11.0 - bookmarks: 3.3.4 - bruteforcesettings: 2.0.1 - calendar: 2.0.4 - carnet: 0.22.2 - checksum: 0.4.5 - cloud_federation_api: 1.1.0 - comments: 1.8.0 - contacts: 3.3.0 - cookbook: 0.7.6 - cospend: 1.0.5 - dav: 1.14.0 - deck: 1.0.5 - external: 3.5.0 - federatedfilesharing: 1.8.0 - federation: 1.8.0 - files: 1.13.1 - files_accesscontrol: 1.8.2 - files_automatedtagging: 1.8.3 - files_downloadactivity: 1.7.0 - files_external: 1.9.0 - files_markdown: 2.3.1 - files_mindmap: 0.0.22 - files_pdfviewer: 1.7.0 - files_rightclick: 0.15.2 - files_sharing: 1.10.1 - files_trashbin: 1.8.0 - files_versions: 1.11.0 - files_videoplayer: 1.7.0 - firstrunwizard: 2.7.0 - flowupload: 1.0.0 - gpxedit: 0.0.13 - gpxmotion: 0.0.11 - gpxpod: 4.2.2 - groupfolders: 6.0.7 - logreader: 2.3.0 - lookup_server_connector: 1.6.0 - mail: 1.4.1 - maps: 0.1.6 - metadata: 0.12.0 - nextcloud_announcements: 1.7.0 - notes: 3.6.4 - notifications: 2.6.0 - oauth2: 1.6.0 - ocsms: 2.1.8 - passman: 2.3.6 - password_policy: 1.8.0 - passwords: 2020.9.0 - phonetrack: 0.6.4 - photos: 1.0.0 - polls: 1.4.3 - printer: 0.0.3 - privacy: 1.2.0 - provisioning_api: 1.8.0 - recommendations: 0.6.0 - richdocuments: 3.7.4 - serverinfo: 1.8.0 - settings: 1.0.0 - sharebymail: 1.8.0 - spreed: 8.0.11 - support: 1.1.1 - survey_client: 1.6.0 - systemtags: 1.8.0 - tasks: 0.13.3 - text: 2.0.0 - theming: 1.9.0 - twofactor_backupcodes: 1.7.0 - twofactor_gateway: 0.17.0 - twofactor_nextcloud_notification: 2.3.0 - twofactor_totp: 5.0.0 - updatenotification: 1.8.0 - user_ldap: 1.8.0 - viewer: 1.2.0 - workflow_pdf_converter: 1.3.2 - workflow_script: 1.3.2 - workflowengine: 2.0.0 ```Nextcloud configuration:
Config report
``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nextcloud.stuck.istmein.de" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/nextcloud.stuck.istmein.de", "htaccess.RewriteBase": "\/", "dbtype": "mysql", "version": "18.0.6.0", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "mail_smtpmode": "smtp", "mail_smtpauthtype": "PLAIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "theme": "", "loglevel": 2, "memcache.local": "\\OC\\Memcache\\APCu", "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory", "shared_folder": "\/Geteilt", "mysql.utf8mb4": true, "app_install_overwrite": [ "passman", "dashboard", "ojsxc", "files_frommail" ], "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```Are you using external storage, if yes which one: SFTP
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
LDAP config
``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder +-------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | Configuration | s02 | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | hasMemberOfFilterSupport | | | homeFolderNamingRule | | | lastJpegPhotoLookup | 0 | | ldapAgentName | cn=nextcloud,dc=cstuck,dc=dyndns,dc=org | | ldapAgentPassword | *** | | ldapAttributesForGroupSearch | | | ldapAttributesForUserSearch | | | ldapBackupHost | | | ldapBackupPort | | | ldapBase | dc=cstuck,dc=dyndns,dc=org | | ldapBaseGroups | dc=cstuck,dc=dyndns,dc=org | | ldapBaseUsers | dc=cstuck,dc=dyndns,dc=org | | ldapCacheTTL | 600 | | ldapConfigurationActive | 1 | | ldapDefaultPPolicyDN | | | ldapDynamicGroupMemberURL | | | ldapEmailAttribute | mail | | ldapExperiencedAdmin | 0 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | | | ldapExpertUsernameAttr | | | ldapExtStorageHomeAttribute | | | ldapGidNumber | gidNumber | | ldapGroupDisplayName | cn | | ldapGroupFilter | (&(|(objectclass=posixGroup))) | | ldapGroupFilterGroups | | | ldapGroupFilterMode | 0 | | ldapGroupFilterObjectclass | posixGroup | | ldapGroupMemberAssocAttr | memberUid | | ldapHost | ldap | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(|(objectclass=posixAccount))(|(uid=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(cn=%uid)(uid=%uid)(uidNumber=%uid)))) | | ldapLoginFilterAttributes | cn;uid;uidNumber | | ldapLoginFilterEmail | 1 | | ldapLoginFilterMode | 1 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 0 | | ldapOverrideMainServer | | | ldapPagingSize | 500 | | ldapPort | 389 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 0 | | ldapUserAvatarRule | default | | ldapUserDisplayName | cn | | ldapUserDisplayName2 | description | | ldapUserFilter | (|(objectclass=posixAccount)) | | ldapUserFilterGroups | | | ldapUserFilterMode | 1 | | ldapUserFilterObjectclass | posixAccount | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 0 | | turnOnPasswordChange | 0 | | useMemberOfToDetectMembership | 1 | +-------------------------------+----------------------------------------------------------------------------------------------------------------------------+ ```Client configuration
Browser: Firefox for Ubuntu 80.0.1
Operating system: 4.15.0-118-generic #119-Ubuntu SMP Tue Sep 8 12:30:01 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Logs
Web server error log
Web server error log
``` Nor Error log for the timestamp with this error: [Sat Sep 26 11:50:23.287415 2020] [access_compat:error] [pid 10657] [client 87.150.88.229:38202] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata [Sat Sep 26 11:52:37.444212 2020] [access_compat:error] [pid 10532] [client 87.150.88.229:41288] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata ```Nextcloud log (data/nextcloud.log)
Nextcloud log
``` Insert your Nextcloud log here No log entries while tagging or moving files. ```Browser log
Browser log
``` Insert your browser log here, this could for example include: Browser Console Log Navigating away, leaving conversation 9 FilesSidebarTabApp.vue:149 This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. files GEThttps://nextcloud.stuck.istmein.de/apps/maps/js/filetypes.js?v=7003d419-9 [HTTP/1.1 404 Not Found 34ms] The resource from “https://nextcloud.stuck.istmein.de/apps/maps/js/filetypes.js?v=7003d419-9” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). files Loading failed for the Githubissues.