Thanks for the reply @gas85 but these settings are for default folders to users.
But I want to keep settings for anonymous access.Sharing through links.
If access to a file has been denied for a user, the user can not:
Create/upload the file
Modify the files
Delete the file
Download the file
Syncronise the file with clients, such as the Nextcloud desktop and mobile clients
I did following in this case.
Create robot user e.g. robo1.
Share this folder with robo1 without delete permission.
Under robo1 create share link with allow upload and editing.
In this case if user will try to delete something it will be forbidden by rule from point 2.
This is not protect you from the changes, e.g. user can edit file and simply delete the content of the file, you could avoid it via unset edit permission from the robo1 user.
P.S. There is a ticket to this functionality that you need:
I think this is misunderstanding. You need to have at least 2 local users to create share in this case.
You have your local User - user.
You have second local User - robot user, e.g. robo1.
As user share locally folder with robo1 without delete permission (and you could also drop edit permission).
Then login asrobo1 user.
Create anonymous share via Link with allow upload and editing.
Share this link and users will not be able to delete files.
it will be as following:
-> user (Folder owner)
-> robo1 (can't delete files)
-> Shared link (with allow upload and editing)
-> Anonymous users can't delete files because of policy set by 'user' for 'robo1'