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]: Sub folder shares were broken on ownership transfer #42407

Open
5 of 8 tasks
luka-nextcloud opened this issue Dec 20, 2023 · 2 comments · May be fixed by #43025
Open
5 of 8 tasks

[Bug]: Sub folder shares were broken on ownership transfer #42407

luka-nextcloud opened this issue Dec 20, 2023 · 2 comments · May be fixed by #43025

Comments

@luka-nextcloud
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

After an ownership transfer (via the web interface), sub shares can be broken and it's impossible to restore.

Steps to reproduce

  • userA shares a folder D1 with userB
  • userB creates and shares a subfolder D2 and shares it with userC
  • userA revoke the share of D1 with userB
  • userA transfers ownership of D1 to userD

After userD accepts the transfer:

  • userC loses access to the folder D2
  • if userD tries to share the folder D2 with userC : error message "Node for share not found, fileid: 132472"

Expected behavior

My suggestion for expected behavior:
Re-share should be deleted if restore failed to not block creating new share for the same user.

Installation method

Community Docker image

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@luka-nextcloud luka-nextcloud added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Dec 20, 2023
@luka-nextcloud luka-nextcloud self-assigned this Dec 20, 2023
@solracsf
Copy link
Member

solracsf commented Dec 21, 2023

Does occ sharing:delete-orphan-shares help here?
It does not fix the root cause of course.

@szaimen szaimen added 0. Needs triage Pending check for reproducibility or if it fits our roadmap 28-feedback 29-feedback and removed 28-feedback labels Jan 2, 2024
@Gravelbones
Copy link

I have the same problem, but coming from a different scenario:

Steps to reproduce

userA shares a folder D1 with userB
userB creates a subfolder D2 and shares it with userC
userA transfers ownership of D1 to userD

After userD accepts the transfer:

userC loses access to the folder D2 (appears empty but visible)
userB can't see the sharing anymore
if userB tries to (re)share the folder D2 with userC : error message "Node for share not found, fileid: x

The problem is fixed by updating oc_table/uid_owner to the UID of userD.
Also userB is not present in oc_users table, due to being syncronized via LDAP, if that means something.

@luka-nextcloud luka-nextcloud linked a pull request Jan 22, 2024 that will close this issue
5 tasks
@luka-nextcloud luka-nextcloud added the 3. to review Waiting for reviews label Jan 22, 2024
@luka-nextcloud luka-nextcloud removed the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants