NPhillips
NPhillips

Reputation: 525

Azure file storage map drive prevent deletion of folders

I have a system in C# that handles CRUD for files stored in azure file storage. This includes permissions for who is allowed to delete, create etc.

The end users would also like to have access to the storage over a mapped drive. This would be for easier browsing, mass uploading, and editing (among other things).

Is it possible to prevent the deletion of top level folders from the mapped drive, especially if it has files inside the directory?

The reason being that accidental deletion of a folder would remove all child files/folders without warning.

I see that this could be a training issue for the end user, but it seems better to prevent the issue from ever happening.

I see you can add a SharedAccessSignature to files but not folders, but I don't want to prevent individual file deletion. Only top level folders as a whole.

Upvotes: 1

Views: 657

Answers (1)

Fei Han
Fei Han

Reputation: 27803

Is it possible to prevent the deletion of top level folders from the mapped drive, especially if it has files inside the directory?

It seems that you want to enable users to mount file share and access/delete files, do not enable users to delete entire folders. As far as I know, it seems to be impossible. Because currently we must specify the storage account key when mounting Azure File shares, everyone who has storage account and account key will have full permissions to manage and operate file shares. And at the moment, Microsoft do not support SAS tokens with SMB access.

Upvotes: 1

Related Questions