nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.76k stars 4k forks source link

[Bug]: External Storage SMB failed when use $user #47911

Open havengit opened 1 week ago

havengit commented 1 week ago

⚠️ This issue respects the following points: ⚠️

Bug description

I have installed last version. then add a external smb storage .Adding permissions to users the config like below, and then I create the folder and add permissions to user “user1” on windows server share/user1 image image image

Steps to reproduce

1.External storage with smb 2.Use $user for subsharepath 3.Cannot save ,show no storage authentication 4.User upload file will show file is locked ,

Expected behavior

  1. User upload file no error

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

root@localhost:/var/www/nextcloud# sudo -u www-data php occ  config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "10.242.2.186"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.6.1",
        "overwrite.cli.url": "http:\/\/10.242.2.186",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

List of activated Apps

sudo -u www-data php occ  app:list
Enabled:
  - activity: 2.21.1
  - calendar: 4.7.16
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.1
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.6
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - spreed: 19.0.8
  - support: 1.12.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_ldap: 1.20.0
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - encryption: 2.17.0
  - suspicious_login: 7.0.0
  - twofactor_totp: 11.0.0-dev

Nextcloud Signing status

no error

Nextcloud Logs

no

Additional info

no

havengit commented 1 week ago

[Uploading nextcloud.log…]()

solracsf commented 1 week ago

Is this the same issue? https://github.com/nextcloud/server/issues/16314

havengit commented 1 week ago

image No, this is not the same scenario. I use $user in remote subfolder. This is has been support in document .The purpose is to allow each user to use their own name for the folder under “share”. My Windows samba server shared folder name is “share”, then under “share” create $user (ldap attribute is samaccount name) image

I'm not sure if this scenario is supported. Am I configuring it correctly?

havengit commented 6 days ago

I haven upgrade version to 29.0.7, the issue still exist.

havengit commented 6 days ago

image image image

After this configuration, it can be used normally. But there was a new problem. Occasionally an error occurs if you enter the smb folder from the external storage tab. No error is reported if you enter from the all file tab.