You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The retention job only takes into account the first node of the first mount point of a file to be deleted. If that node is not deletable the retention job will fail to delete it, even if it would be deletable when using a node from another mount point.
Moreover, in some cases the retention job may not be able to delete a file even if there is a single mount point if the file is not deletable in that mount point (for example, if it is in a group folder without delete permissions). -> Extracted to #142
Steps to reproduce
As an admin, create users user0 and user1
Log in as user0
Open the Files app
Create a folder
Share the folder with user1
Remove delete permissions from the share
Open the folder
Upload an old file (a file with an mtime from months or years ago)
Add a tag deleteTest to that file
Log out
Log in as user1 (so the mount point for the shared folder is created)
Log out
As an admin, create user user2
Transfer ownership of files from user0 to user2 with occ files:transfer-ownership user0 user2
Delete user0 with occ user:delete user0 (so the mount point for the shared folder becomes the first one for the file)
Log in as user1
Do NOT log out (so the shared storage for the shared folder is kept "alive"; this needs to be done after the share was transferred)
As an admin, open the Flow admin settings
Create a new retention job to delete files with tag deleteTest and a modification time older than 10 days
Set debug level for Nextcloud logs with occ config:system:set loglevel --type integer --value 0
The following SQL query can be used to find out the job ID; if there is more than one retention job look for the matching tag ID in the arguments: SELECT id, argument FROM oc_jobs WHERE class LIKE "%Files_Retention%"
Expected behaviour
The file is deleted.
Actual behaviour
The file is not deleted. Nextcloud logs show a NotPermittedException when trying to delete the file with the retention job.
The text was updated successfully, but these errors were encountered:
The retention job only takes into account the first node of the first mount point of a file to be deleted. If that node is not deletable the retention job will fail to delete it, even if it would be deletable when using a node from another mount point.
Moreover, in some cases the retention job may not be able to delete a file even if there is a single mount point if the file is not deletable in that mount point (for example, if it is in a group folder without delete permissions).-> Extracted to #142Steps to reproduce
occ files:transfer-ownership user0 user2
occ user:delete user0
(so the mount point for the shared folder becomes the first one for the file)occ config:system:set loglevel --type integer --value 0
occ background-job:execute --force-execute XXX
(requires Add a command to show info about a background job and force-execute it server#27217)SELECT id, argument FROM oc_jobs WHERE class LIKE "%Files_Retention%"
Expected behaviour
The file is deleted.
Actual behaviour
The file is not deleted. Nextcloud logs show a
NotPermittedException
when trying to delete the file with the retention job.The text was updated successfully, but these errors were encountered: