Save a file in a network location REMOVING the DELETE Privilege

Hello,

I need to save a file from my application to a network location by ONLY providing modify / re-save permission and totally avoiding DELETE Permission.
Vividly I have to completely stop any user NOT to DELETE that file physically from the location. This has to be controlled from my application.

I think it is possible manually, BUT I need to know how to implement it through VB.NET ? Any piece of code implementations would be of great help.

Knowledge and help is very much appreciated.
ravindrasenAsked:
Who is Participating?
 
David Johnson, CD, MVPOwnerCommented:
I need to save a file from my application to a network location by ONLY providing modify / re-save permission and totally avoiding DELETE Permission.
Vividly I have to completely stop any user NOT to DELETE that file physically from the location. This has to be controlled from my application.


Can't be done without constantly changing the permissions i.e. add write/modify permissions write the file and then remove the permissions after the file is saved.  

Better to save the file to a temporary folder and have a watchdog process running on the server that is running as a seperate user move the file to the desired location.. this watchdog service only monitors a folder and moves all newly created files to the folder you want. This way you are not continually playing with permissions.
0
 
ravindrasenAuthor Commented:
So is it possible to have the write, save, modify permissions on a file AND not Delete permission ever.?

The idea is if to save a specific file on a network location, the user can only be able to re-write and save on it BUT NEVER be able to DELETE the file.

Do you think this will work out ?
0
 
David Johnson, CD, MVPOwnerCommented:
Nope, modify gives delete.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.