server icon indicating copy to clipboard operation
server copied to clipboard

When uploading a new version to a SMB storage using the web interface the file is not replaced if is used the home storage for part files

Open linuxkafe opened this issue 7 years ago • 2 comments

Steps to reproduce

  1. Set 'part_file_in_storage' => false,
  2. Try to replace a file by using the web interface on a external smb storage

Expected behaviour

The file to be replaced

Actual behaviour

Selecting any option the file is not replaced

Server configuration

Operating system: Debian 9 Web server: Apache/2.4.25 Database: MariaDB 10.1.37-MariaDB, PHP version: PHP 7.0.33-0+deb9u1 Nextcloud version: (see Nextcloud admin page) 14.0.4 Updated from an older Nextcloud/ownCloud or fresh install: Updated Where did you install Nextcloud from: Official Channel Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:

  • accessibility: 1.0.1
  • activity: 2.7.0
  • admin_audit: 1.4.0
  • admin_notifications: 1.0.2
  • announcementcenter: 3.3.1
  • apporder: 0.6.0
  • audioplayer: 2.4.1
  • bookmarks: 0.14.3
  • bruteforcesettings: 1.2.0
  • calendar: 1.6.4
  • checksum: 0.4.1
  • circles: 0.15.2
  • cloud_federation_api: 0.0.1
  • comments: 1.4.0
  • contacts: 2.1.8
  • data_request: 1.1.0
  • dav: 1.6.0
  • drawio: 0.9.1
  • end_to_end_encryption: 1.0.5
  • external: 3.1.0
  • federatedfilesharing: 1.4.0
  • federation: 1.4.0
  • files: 1.9.0
  • files_accesscontrol: 1.4.0
  • files_antivirus: 1.4.2
  • files_automatedtagging: 1.4.0
  • files_external: 1.5.0
  • files_markdown: 2.0.5
  • files_pdfviewer: 1.3.2
  • files_retention: 1.3.1
  • files_sharing: 1.6.2
  • files_texteditor: 2.6.0
  • files_trashbin: 1.4.1
  • files_versions: 1.7.1
  • files_videoplayer: 1.3.0
  • firstrunwizard: 2.3.0
  • gallery: 18.1.0
  • groupfolders: 2.0.1
  • impersonate: 1.1.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.2.0
  • metadata: 0.8.0
  • nextcloud_announcements: 1.3.0
  • notes: 2.5.1
  • notifications: 2.2.1
  • oauth2: 1.2.1
  • password_policy: 1.4.0
  • provisioning_api: 1.4.0
  • quota_warning: 1.3.0
  • richdocuments: 3.0.5
  • serverinfo: 1.4.0
  • sharebymail: 1.4.0
  • socialsharing_email: 1.0.4
  • spreed: 4.0.2
  • support: 1.0.0
  • survey_client: 1.2.0
  • systemtags: 1.4.0
  • tasks: 0.9.8
  • theming: 1.5.0
  • theming_customcss: 1.2.0
  • twofactor_backupcodes: 1.3.1
  • twofactor_nextcloud_notification: 0.2.4
  • twofactor_totp: 1.5.0
  • twofactor_u2f: 1.6.1
  • updatenotification: 1.4.1
  • user_external: 0.4
  • user_ldap: 1.4.0
  • workflowengine: 1.4.0 Disabled:
  • encryption
  • files_clipboard
  • passman

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": [
            "drive.up.pt",
            "box.up.pt",
            "drive01.up.pt",
            "drive02.up.pt",
            "193.137.29.11",
            "193.137.29.12"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "tempdirectory": "\/ocdata\/drive\/tmp",
        "part_file_in_storage": false,
        "overwrite.cli.url": "https:\/\/drive.up.pt",
        "dbtype": "mysql",
        "version": "14.0.4.2",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 1,
        "log_type": "syslog",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "auth.bruteforce.protection.enabled": false,
        "singleuser": false,
        "filelocking.enabled": false,
        "filelocking.ttl": 5,
        "filelocking.debug": false,
        "trashbin_retention_obligation": "30,31",
        "updater.release.channel": "production",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

or 

Are you using external storage, if yes which one: local/smb/sftp/... smb Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... 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

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                                   |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                                                                                                     |
| hasPagedResultSupport         |                                                                                                                                                       |
| homeFolderNamingRule          |                                                                                                                                                       |
| lastJpegPhotoLookup           | 0                                                                                                                                                     |
| ldapAgentName                 | cn=drive,cn=managers,ou=spup,o=up,c=pt                                                                                                                |
| ldapAgentPassword             | ***                                                                                                                                                   |
| ldapAttributesForGroupSearch  | o=up,c=pt                                                                                                                                             |
| ldapAttributesForUserSearch   | eduPersonPrincipalName;mail                                                                                                                           |
| ldapBackupHost                | artemis.up.pt                                                                                                                                         |
| ldapBackupPort                | 389                                                                                                                                                   |
| ldapBase                      | o=up,c=pt                                                                                                                                             |
| ldapBaseGroups                | ou                                                                                                                                                    |
| ldapBaseUsers                 | o=up,c=pt                                                                                                                                             |
| ldapCacheTTL                  | 900                                                                                                                                                   |
| ldapConfigurationActive       | 1                                                                                                                                                     |
| ldapDefaultPPolicyDN          |                                                                                                                                                       |
| ldapDynamicGroupMemberURL     |                                                                                                                                                       |
| ldapEmailAttribute            | mail                                                                                                                                                  |
| ldapExperiencedAdmin          | 1                                                                                                                                                     |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                       |
| ldapExpertUUIDUserAttr        | UPortoNMec                                                                                                                                            |
| ldapExpertUsernameAttr        | UPortoNMec                                                                                                                                            |
| ldapGidNumber                 | gidNumber                                                                                                                                             |
| ldapGroupDisplayName          | cn                                                                                                                                                    |
| ldapGroupFilter               |                                                                                                                                                       |
| ldapGroupFilterGroups         |                                                                                                                                                       |
| ldapGroupFilterMode           | 0                                                                                                                                                     |
| ldapGroupFilterObjectclass    |                                                                                                                                                       |
| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                                                          |
| ldapHost                      | arya.up.pt                                                                                                                                            |
| ldapIgnoreNamingRules         |                                                                                                                                                       |
| ldapLoginFilter               | (&(&(objectClass=*)(&(eduPersonPrincipalName=*)(mail=*)(UPortoUserStatus=A)(eduPersonPrimaryAffiliation=affiliate)))(|(eduPersonPrincipalName=%uid))) |
| ldapLoginFilterAttributes     |                                                                                                                                                       |
| ldapLoginFilterEmail          | 0                                                                                                                                                     |
| ldapLoginFilterMode           | 1                                                                                                                                                     |
| ldapLoginFilterUsername       | 1                                                                                                                                                     |
| ldapNestedGroups              | 0                                                                                                                                                     |
| ldapOverrideMainServer        |                                                                                                                                                       |
| ldapPagingSize                | 100                                                                                                                                                   |
| ldapPort                      | 389                                                                                                                                                   |
| ldapQuotaAttribute            |                                                                                                                                                       |
| ldapQuotaDefault              |                                                                                                                                                       |
| ldapTLS                       | 0                                                                                                                                                     |
| ldapUserAvatarRule            | default                                                                                                                                               |
| ldapUserDisplayName           | edupersonnickname                                                                                                                                     |
| ldapUserDisplayName2          |                                                                                                                                                       |
| ldapUserFilter                | (&(objectClass=*)(&(eduPersonPrincipalName=*)(mail=*)(UPortoUserStatus=A)(eduPersonPrimaryAffiliation=affiliate)))                                    |
| ldapUserFilterGroups          |                                                                                                                                                       |
| ldapUserFilterMode            | 1                                                                                                                                                     |
| ldapUserFilterObjectclass     |                                                                                                                                                       |
| ldapUuidGroupAttribute        | auto                                                                                                                                                  |
| ldapUuidUserAttribute         | auto                                                                                                                                                  |
| turnOffCertCheck              | 1                                                                                                                                                     |
| turnOnPasswordChange          | 0                                                                                                                                                     |
| useMemberOfToDetectMembership | 1                                                                                                                                                     |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+

Client configuration

Browser: Google Chrome

Operating system: Ubuntu 18.09 / Windows 10

Logs

Web server error log

Web server error log It doesn't write any error ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
core.js?v=694b9c32-69:2 Uncaught Error: cannot call methods on ocdialog prior to initialization; attempted to call method 'destroy'
    at Function.error (core.js?v=694b9c32-69:2)
    at HTMLDivElement.<anonymous> (core.js?v=694b9c32-69:13)
    at Function.each (core.js?v=694b9c32-69:2)
    at a.fn.init.each (core.js?v=694b9c32-69:2)
    at a.fn.init.e.fn.(/index.php/apps/files/anonymous function) [as ocdialog] (https://drive.up.pt/core/vendor/core.js?v=694b9c32-69:13:5938)
    at HTMLDivElement.close (merged-template-prepend.js?v=694b9c32-69:947)
    at e.(/index.php/apps/files/anonymous function).(anonymous function)._trigger (https://drive.up.pt/core/vendor/core.js?v=694b9c32-69:13:10075)
    at merged-template-prepend.js?v=694b9c32-69:214
error @ core.js?v=694b9c32-69:2
(anonymous) @ core.js?v=694b9c32-69:13
each @ core.js?v=694b9c32-69:2
each @ core.js?v=694b9c32-69:2
e.fn.(anonymous function) @ core.js?v=694b9c32-69:13
close @ merged-template-prepend.js?v=694b9c32-69:947
_trigger @ core.js?v=694b9c32-69:13
(anonymous) @ merged-template-prepend.js?v=694b9c32-69:214
setTimeout (async)
close @ merged-template-prepend.js?v=694b9c32-69:213
(anonymous) @ core.js?v=694b9c32-69:13
(anonymous) @ core.js?v=694b9c32-69:13
each @ core.js?v=694b9c32-69:2
each @ core.js?v=694b9c32-69:2
e.fn.(anonymous function) @ core.js?v=694b9c32-69:13
click @ merged-template-prepend.js?v=694b9c32-69:935
(anonymous) @ merged-template-prepend.js?v=694b9c32-69:123
dispatch @ core.js?v=694b9c32-69:3
r.handle @ core.js?v=694b9c32-69:3
b) The network log
c) ...

linuxkafe avatar Dec 17 '18 15:12 linuxkafe

Still occurring? Could you give us a screencast of what is happening when you do that? If you can: with the browser console open so we can see in real time when this error happen :)

skjnldsv avatar Aug 15 '19 05:08 skjnldsv

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

ghost avatar Sep 14 '19 05:09 ghost