Shared disable move/copy option

Hi all!

I configured users for read-only and without upload permisions (Quota = 0) but in shared folder they can copy files to root folder, ¿is possible to desactivate copy/move option in shared permisions? or avoid to copy to root folder.

Thanks in advance,

1 Like

We have the exact same problem. Are there any solutions for this?

I had exactly the same problem, if you need a solution, i got one. (simple but working)

Situation:
We have just 3 shares where users should be able to work on, sync is also not allowed and handled by workflow app, further we also run in the problem, that users can move files from share to either root folder or a user created subfolder in user space.

This is a big issue, as you can loose data, and also in 2023 i found no way to take care of it with all build in features in nextcloud.

So i adjusted it by a simple way:
I add a check to the moveFileFunction, that takes care about source and target of move operation. (just one file needs to be changed)

If MoveTarget lays in the SourceRoot Path, then move is allowed,
otherwise it is forbidden and response to user.

Example of protect moving files:
i am at → /EXT_Storage_Local/ and try to move the New text file.md to → /GroupFolder_Elektro
as you can see on image, move operation fails and gives user a message as this move lays not in the allowed RootPath.

Example of allowed moving files:
i am at → /EXT_Storage_Local/ and try to move the New text file.md to → /EXT_Storage_Local/sub1/sub2/sub3

Tested on: NC 27.1.2

At moment i prepare a github issue for it, will add link later, when it is online.

If you are still looking for a solution - just give me some feedback - thx

2 Likes

Would be wonderfull, if this could be implemented in a way, that the creator of the folder had the option to activate this as a feature.
Futhermore, we need a way to allow a group (admins for example), to break out of this rule. Not sure, if this workaround allows a user to rename the root-share. The “normal” User should not be allowed to do this, a priviliged user must have the possibility.

Either way, the functinality proposed by @GoWeasel is an essential feature in any business enviroment.

Thanks for your work!

1 Like

Short update as mention before:
Here u find the github Issue

1 Like