Prevent users from deleting files when accessed from a link

%3CLINGO-SUB%20id%3D%22lingo-sub-2930353%22%20slang%3D%22en-US%22%3EPrevent%20users%20from%20deleting%20files%20when%20accessed%20from%20a%20link%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2930353%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20SharePoint%20site%20which%20is%20private%20and%20only%20accessible%20by%20one%20user.%20This%20user%20creates%20%22edit%20links%22%20for%20specific%20files%20when%20requested%20by%20other%20people%20in%20the%20organization.%20So%20all%20but%20one%20user%20only%20accesses%20these%20files%20by%20direct%20links.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20when%20a%20user%20opens%2C%20for%20instance%2C%20a%20word%20document%20via%20an%20edit%20link%20they%20can%20also%20move%20the%20file%20from%20the%20SharePoint%20site.%20And%20thereby%20deleting%20the%20file%20from%20the%20original%20site.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20prevent%20this%3F%20Either%20by%20setting%20a%20general%20permission%20on%20the%20site%20similar%20to%20%22only%20admins%20of%20this%20site%20can%20delete%20files%22.%20Or%20by%20creating%20another%20form%20of%20link%20(programmatically%20is%20fine)%20that%20lets%20the%20user%20open%20the%20file%20in%20%22non%20delete%20mode%22.%20Or%20another%20way.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2930353%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Efiles%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESites%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

I have a SharePoint site which is private and only accessible by one user. This user creates "edit links" for specific files when requested by other people in the organization. So all but one user only accesses these files by direct links.

 

However, when a user opens, for instance, a word document via an edit link they can also move the file from the SharePoint site. And thereby deleting the file from the original site.

 

Is there any way to prevent this? Either by setting a general permission on the site similar to "only admins of this site can delete files". Or by creating another form of link (programmatically is fine) that lets the user open the file in "non delete mode". Or another way.

 

 

1 Reply

Hi @tomaseketorp,

This behaviour is 'by design' for the Edit sharing option.

 

  • When you share items with this type of link, people can edit files, and can add files in a shared folder
  • Recipients can forward the link, change the list of people sharing the files or folder, and change permissions for recipients.
  • If you're sharing a folder, people with Edit permissions can copy, move, edit, rename, share, and delete anything in the folder.

Unchecking this box means that people can view, copy or download your items without signing in.


Based on the problem you are experiencing, you may need to change the process for editing the document, such as downloading the file to complete changes for example and uploading the edited version to a different location for example.

The following article for OneDrive explains this in more detail: Share OneDrive files and folders (microsoft.com)

I hope that helps.

Pete