-
Notifications
You must be signed in to change notification settings - Fork 87
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
Restoring of deleted shared file inside folder inside groupfolder not possible #3339
Comments
@unfixa1 Patching the original_location column to match the expected value allows the restore again. So I can confirm that my assumptions were correct. |
Thanks for the debugging, consider this an acknowledged bug that will be fixed! |
@x7airworker Can you please post more comprehensive reproduction steps?
How do you give readonly permissions to user A, through a group the user is part of?
From user A or a different user?
You probably meant
Delete it from where? The shared file, the shared folder or the groupfolder (does user B have access to that as well?)
Sounds like user A and B are part of a group that has access to Groupfolder A including delete permissions? |
@provokateurin Sure, I've automated the whole setup so I might missed some parts.
There is a group "A". All files inside folder "B" will automatically get full-access so this enables the user to create folders inside "B" with delete permissions.
Yes
Yes
User B only has read-only access to the groupfolder. So the permsisions are extended through the share.
A has access to his own folder, while B is getting access to a share initiated by A. Let me know if you need more information. I could also try to create a bash or SQL script which creates this exact setup. |
Thanks for the quick reply! I will try to reproduce it again with these steps. A script might not be necessary, but if I'm still unable to reproduce it it would be very helpful. |
In the screenshot you deny the group read permission and the user inherits it. This way the user can never see the folder, so something is still not right with your steps. To continue with your steps I allowed these two for the user A as well. |
I agree that it looks wrong, but it works without problems for me (maybe because they are created programmatically and the mask isn't like the frontend expects it). So I would just give the read permission to the user.
all permissions are allowed for files inside folder "B" -> see my previous answer "All files inside folder "B" will automatically get full-access.". The folder inside "B" then looks like this: The folder structure then looks like this:
|
Ah I think I missed the ACL for folder C! |
@x7airworker I tried to reproduce it with a unit test, but I still couldn't get it to work: #3358 What is confusing to me is that the trash of the user A seems to be empty. I wonder if it is related to #3281. @x7airworker can you make sure you are on the latest Groupfolders release? |
Also if you can share your script that has all the steps it would also be super helpful. |
@provokateurin I've just took a short look at your test. This would be my first guess, but I would take a closer look tomorrow. |
Added the line, but nothing changed. |
Hey @provokateurin I've forked your test and tried to replicate my logic. |
Thank you!! Having a test to replicate this consistently is super helpful, I should be able to fix it now :) |
@provokateurin Any news on this? |
Sorry, I'm busy with other tasks at the moment. I will come back to it hopefully soon. |
I improved the test by also checking for the trash of the user A and it also has the wrong original location :/ |
How to use GitHub
Steps to reproduce
Expected behaviour
The file should be able to be restorable, with at least user "A".
Actual behaviour
The request results in http status 500 with a NotPermittedException.
I've noticed that the
original_location
column in tableoc_group_folders_trash
doesn't contain the folder B, but just the name of file C with the folder_id of groupfolder A. I think this results in a bad ACL check.Server configuration
Operating system: Alpine; Docker
Web server: Nginx
Database: MySQL (Galera)
PHP version: 8.2.7
Nextcloud version: 28.0.9
Group folders version: 16.0.8
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: official source; self-built docker image
Are you using external storage, if yes which one: s3
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Chrome
Operating system: MacOS 15
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: