-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Moving share in/out of another one doesn't update uid_owner in some cases #30791
Comments
Interestingly, the transfer ownership will skip those bogus entries. Steps
The share did not get transferred and the command says that the share with that id points at a non-existing file (which is a wrong error message) and skips it, so the share stays broken in some way. |
Do you know if this has ever worked, I don't remember there being any logic to handle this. I guess the only real way to handle this is listen for all move events, if the owner of the source and target match, find all shares in the moved folder and update them, which wouldn't exactly be cheap to do with a large number of shares |
I'm not sure. Maybe it always flew under the radar since currently only transfer ownership seems to reveal the issue. We also noted in some case that fileid resolution can fail also in such scenarios, see #31695 |
I've managed to fix the issue: #31728 |
How to use GitHub
Steps to reproduce
Scenario 1: move in folder where a share exists in a sub-dir
select * from oc_share where file_target like '%subshare%'
=> 💥 uid_owner should be "admin" instead of "alice"Scenario 2: move out a folder
select * from oc_share where file_target like '%movingout%'
=> 💥 uid_owner should be "alice instead of "admin"Scenario 3: move out a folder with a subshare
Same as scenario 2 but the share is on "/common/movingout/subshare".
Expected behaviour
uid_owner is always correctly adjusted
Actual behaviour
uid_owner stays on the previous value
Server configuration
Database: MariaDB 10.6.5
PHP version: 7.4.27
Nextcloud version: 23.0.0
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: git v23.0.0
Logs
Nextcloud log (data/nextcloud.log)
No log entries for both scenarios.
To dos
The text was updated successfully, but these errors were encountered: