Skip to content

failure uploading files to external openstack storage #6019

Description

Steps to reproduce

  1. select "upload file" within the openstack folder

Expected behaviour

See the file

Actual behaviour

Internal Server Error

Fatal | webdav | Sabre\DAV\Exception: Could not rename part file to final file |
Error | webdav | renaming part file to final file failed ($run: true, $renameOkay: false, $fileExists: false)
Error | PHP | Undefined index: /tmp/oc_tmp_ZnaGMx-.part at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/Swift.php#620

I can upload a file via openstack/swift and see it in the nextcloud folder. But cannot upload a file via nextcloud into the folder connected to openstack

Server configuration

Operating system: CentOS 7.3

Web server: httpd-2.4.6-45

Database: mariadb-server-5.5.52-1

PHP version: 7.0.10

Nextcloud version: 12.0.1

Updated from an older Nextcloud/ownCloud or fresh install: 12.0

Where did you install Nextcloud from: Downloaded from nextclod

Signing status:

Signing status
Login as admin user into your Nextcloud and access index.php/settings/integrity/failed:
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:
  - activity: 2.5.2
  - bookmarks: 0.10.1
  - bruteforcesettings: 1.0.2
  - calendar: 1.5.3
  - comments: 1.2.0
  - contacts: 1.5.3
  - dav: 1.3.0
  - encryption: 1.6.0
  - federatedfilesharing: 1.2.0
  - federation: 1.2.0
  - files: 1.7.2
  - files_external: 1.3.0
  - files_pdfviewer: 1.1.1
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - gallery: 17.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.1
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - password_policy: 1.2.2
  - provisioning_api: 1.2.0
  - richdocuments: 1.12.34
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - spreed: 2.0.1
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - tasks: 0.9.5
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - updatenotification: 1.2.0
  - user_ldap: 1.2.1
  - workflowengine: 1.2.0
Disabled:
  - admin_audit
  - user_external
</details>

**Nextcloud configuration:**
<details>
<summary>Config report</summary>

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

or

Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

{
"system": {
"updatechecker": false,
"instanceid": "ocntemyxkcff",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"owncloud.dkrz.de",
"nextcloud.dkrz.de",
"136.172.11.23",
"[2001:638:70e:10b::17]"
],
"datadirectory": "/var/www/nextcloud/data",
"overwrite.cli.url": "http://owncloud.dkrz.de/nextcloud",
"dbtype": "mysql",
"version": "12.0.1.5",
"dbname": "owncloud",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"logtimezone": "UTC",
"installed": true,
"ldapIgnoreNamingRules": false,
"maintenance": false,
"theme": "",
"loglevel": 2,
"htaccess.RewriteBase": "/",
"mail_smtpmode": "php",
"mail_smtpsecure": "ssl",
"mail_from_address": "network",
"mail_domain": "dkrz.de",
"mail_smtpauth": 1,
"log_rotate_size": 500000000,
"memcache.local": "\OC\Memcache\APCu",
"ldapProviderFactory": "\OCA\User_LDAP\LDAPProviderFactory",
"updater.secret": "REMOVED SENSITIVE VALUE"
}
}

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

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

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                 | s01                                                                                               |
+-------------------------------+---------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      |                                                                                                   |
| hasPagedResultSupport         |                                                                                                   |
| homeFolderNamingRule          |                                                                                                   |
| lastJpegPhotoLookup           | 0                                                                                                 |
| ldapAgentName                 | cn=dkrzagent,ou=Special Users,dc=adm                                                              |
| ldapAgentPassword             | ***                                                                                               |
| ldapAttributesForGroupSearch  |                                                                                                   |
| ldapAttributesForUserSearch   |                                                                                                   |
| ldapBackupHost                |                                                                                                   |
| ldapBackupPort                |                                                                                                   |
| ldapBase                      | o=ldap,o=root                                                                                     |
| ldapBaseGroups                | ou=group,o=ldap,o=root                                                                            |
| ldapBaseUsers                 | ou=people,o=ldap,o=root                                                                           |
| ldapCacheTTL                  | 600                                                                                               |
| ldapConfigurationActive       | 1                                                                                                 |
| ldapDefaultPPolicyDN          |                                                                                                   |
| ldapDynamicGroupMemberURL     |                                                                                                   |
| ldapEmailAttribute            | mail                                                                                              |
| ldapExperiencedAdmin          | 1                                                                                                 |
| ldapExpertUUIDGroupAttr       | cn                                                                                                |
| ldapExpertUUIDUserAttr        | uid                                                                                               |
| ldapExpertUsernameAttr        | uid                                                                                               |
| ldapGidNumber                 | gidNumber                                                                                         |
| ldapGroupDisplayName          | cn                                                                                                |
| ldapGroupFilter               | (&(objectClass=posixGroup)(|(o=dkrz-mitarbeiter)(o=dkrz-uni)))                                    |
| ldapGroupFilterGroups         | k20200                                                                                            |
| ldapGroupFilterMode           | 0                                                                                                 |
| ldapGroupFilterObjectclass    | posixGroup                                                                                        |
| ldapGroupMemberAssocAttr      | memberUid                                                                                         |
| ldapHost                      | ldaps://dsp-dmz.dkrz.de                                                                           |
| ldapIgnoreNamingRules         |                                                                                                   |
| ldapLoginFilter               | (&(objectclass=posixAccount)(!(nsAccountLock=true))(|(o=dkrz-mitarbeiter)(o=dkrz-uni))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                                                                                   |
| ldapLoginFilterEmail          | 0                                                                                                 |
| ldapLoginFilterMode           | 0                                                                                                 |
| ldapLoginFilterUsername       | 1                                                                                                 |
| ldapNestedGroups              | 0                                                                                                 |
| ldapOverrideMainServer        |                                                                                                   |
| ldapPagingSize                | 0                                                                                                 |
| ldapPort                      | 636                                                                                               |
| ldapQuotaAttribute            |                                                                                                   |
| ldapQuotaDefault              |                                                                                                   |
| ldapTLS                       | 0                                                                                                 |
| ldapUserDisplayName           | gecos                                                                                             |
| ldapUserDisplayName2          |                                                                                                   |
| ldapUserFilter                | (&(objectclass=posixAccount)(!(nsAccountLock=true))(|(o=dkrz-mitarbeiter)(o=dkrz-uni)))           |
| ldapUserFilterGroups          |                                                                                                   |
| ldapUserFilterMode            | 0                                                                                                 |
| ldapUserFilterObjectclass     | posixAccount                                                                                      |
| ldapUuidGroupAttribute        | auto                                                                                              |
| ldapUuidUserAttribute         | auto                                                                                              |
| turnOffCertCheck              | 0                                                                                                 |
| turnOnPasswordChange          | 0                                                                                                 |
| useMemberOfToDetectMembership | 1                                                                                                 |
+-------------------------------+---------------------------------------------------------------------------------------------------+

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.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
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
b) The network log
c) ...

Activity

  1. mirtouf commented on Aug 8, 2017

    @mirtouf

    Duplicate of bug #5882 and probably #5866
    Anyway, I have the same behaviour with NC 12.

  2. cbartz commented on Aug 14, 2017

    @cbartz
    Contributor

    It seems that array assignment is missing in apps/files_external/lib/Lib/Storage/Swift.php .
    Adding self::$tmpFiles[$tmpFile] = $path; in Line 415 does the job for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions