Prevent Users from Deleting Folders or Files

Jimmy Jr asked on May 25, 2024 10:06

Hi there,

I need some help with setting permissions to block users from deleting files or folders. One of my staff members mistakenly deleted a folder on our site, and the weird thing is I can't recover it. Fortunately, the files were not very important, but I don't want this to happen in the future.

I have tried looking at the permission settings and unchecking the relevant boxes, but it hasn't solved the issue. Can you please help me with this?

Thanks!

Image Text

Correct Answer

Juraj Ondrus answered on May 28, 2024 05:30

Makes sense now. By default, the media files are not moved to the bin. You need to set it so all objects are deleted to the bin.
And for the permissions - set the media library permissions according your needs. Sample screenshot.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Juraj Ondrus answered on May 27, 2024 05:45

What are the files and folders? Do you mean like folders and files in the content tree? (e.g. a Folder page type and CMS.File page) If yes, it seems that they were not only deleted but destroyed - thus cannot be restored from the bin.
You have set the permissions for all content. But, check also the page type permissions and also page level permissions as they can be set differently.

0 votesVote for this answer Mark as a Correct answer

Jimmy Jr answered on May 28, 2024 05:20

Hi Juraj,

I'm talking about files and folders in the media libraries. Is there a way to prevent my staff from mistakenly deleting a folder or file on our site? Thank you.

0 votesVote for this answer Mark as a Correct answer

Jimmy Jr answered on May 28, 2024 05:39

"I tried setting it like this, but somehow I am still able to delete files and folders. Is there a way I can block folder or file deletion, even for users with 'global administrator' roles? I have many staff accounts, most of which have global roles. I can block them one by one, but that would take a lot of time." Image Text

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 28, 2024 05:40

Isn't it possible that your user account is global administrator? Check this with some dummy account assigned with given role and permissions.

0 votesVote for this answer Mark as a Correct answer

Jimmy Jr answered on May 28, 2024 05:47

Yes, my user has global administrator roles, but most of my staff also have default global admin roles. That's why I need a quick setting to block them from deleting a folder/files. I can lower their roles individually, but that takes time. Is there a way to give them permission to upload only?

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 28, 2024 05:59

Well, global administrator are not checked for any permissions anywhere! You need to change the privilege level and set it to Editor and then assign the users with roles and the roles with appropriate permissions. There is no other way.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.