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

[Bug]: '403 forbidden' when moving file from local external mount #6187

Open
5 of 8 tasks
bovender opened this issue Nov 1, 2023 · 7 comments
Open
5 of 8 tasks

[Bug]: '403 forbidden' when moving file from local external mount #6187

bovender opened this issue Nov 1, 2023 · 7 comments
Labels
0. Needs triage server Server related issues.

Comments

@bovender
Copy link

bovender commented Nov 1, 2023

⚠️ Before submitting, please verify the following: ⚠️

Bug description

When attempting to move a file that resides in a local external mount to elsewhere in my Nextcloud folders, Nextcloud Deskop recently started to report 403 forbidden errors.

I have had this external mount for the past several years.

I can move files from the external mount using the web UI without problems.

I can also move files around when I ssh into the server and act as www-data.

It's only with the desktop client that this error occurs.

Steps to reproduce

  1. In your desktop file manager of choice, navigate to the folder that is an external mount.
  2. Select a file, move it somewhere else.
  3. The file gets moved, but is immediately moved back when Nextcloud Deskop is running.

Expected behavior

I should be able to move files from the external mount as it used to be.

Which files are affected by this bug

[redacted].pdf

Operating system

Linux

Which version of the operating system you are running.

KDE neon 5.27

Package

Appimage

Nextcloud Server version

27.1.3

Nextcloud Desktop Client version

3.10.1

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

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

{
  "reqId": "Pi5oFOLzLM9etypGredV",
  "level": 3,
  "time": "2023-11-01T08:43:38+00:00",
  "remoteAddr": "[redacted]",
  "user": "[redacted]",
  "app": "PHP",
  "method": "MOVE",
  "url": "/remote.php/dav/files/[redacted]/Dokumente/Dokumentenscanner/[redacted].pdf",
  "message": "rename(//external_storage/dokumentenscanner/[redacted].pdf,//var/www/html/data/[redacted]/files/Geschäftlich/[redacted].pdf): Operation not permitted at /var/www/html/lib/private/Files/Storage/Local.php#378",
  "userAgent": "Mozilla/5.0 (Linux) mirall/3.10.1 (build 18410) (Nextcloud, neon-6.2.0-35-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)",
  "version": "27.1.3.2",
  "data": {
    "app": "PHP"
  }
}

Additional info

I apologize for not attaching the desktop client debug archive, I looked around inside the ZIP file and it contains a lot of private/confidential information that I would not like to see publicly exposed on Github. I will be happy to provide further technical information if it helps to solve the issue.

@bovender
Copy link
Author

bovender commented Nov 1, 2023

Interestingly, first copying and then deleting files from the external storage folder works fine.

Something's wrong with moving as such.

@joshtrichards
Copy link
Member

I think this was fixed by nextcloud/server#38623 + nextcloud/server#39644, but looking closer it was not backported to NC27.

You're welcome to manually apply those patches to see if they address your issue as well of course.

It'll be in NC28 though. Not sure if the lack of a backport was an oversight or for a good reason.

Cc: @kesselb

@raldone01
Copy link
Contributor

For any one coming across this.
Here is how you can patch your nc27 installation:

cd /tmp
wget https://github.com/nextcloud/server/pull/38623.patch
wget https://github.com/nextcloud/server/pull/39644.patch
cd /var/www/html # your nextcloud installation folder
git apply --ignore-space-change --ignore-whitespace -v /tmp/38623.patch
git apply --ignore-space-change --ignore-whitespace -v /tmp/39644.patch

@joshtrichards joshtrichards added the server Server related issues. label Nov 20, 2023
@bovender
Copy link
Author

Hm, this did not fix it for me.

@raldone01
Copy link
Contributor

Did you verify that the patches were applied correctly and have you restarted the server?

@AlleNPooh
Copy link

Did you verify that the patches were applied correctly and have you restarted the server?
when i patches
result this

error: patch failed: lib/private/Files/Storage/Local.php:368
error: lib/private/Files/Storage/Local.php: patch does not apply

@bovender
Copy link
Author

Did you verify that the patches were applied correctly and have you restarted the server?

Yes, I double-checked inside the Docker container, and I did restart the container (as well as the reverse proxy that sits in front of it). As a workaround, I now copy and then delete the files, this works very well (and is just one keypress more than moving a file).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage server Server related issues.
Projects
None yet
Development

No branches or pull requests

4 participants