Friday, 15 November 2013

NTFS permissions , Read-Write-Modify but can't delete .

Guys,
We had a situation where we had to provide read/write permission on root folder but full permission on sub-folders and its content.
Here is the game begun :-

Scenerio :-
User can read/write root folder but can't modify it however he/she has delete rights to perform read/write/modify/delete action on subfolders and files.

Challenge :-
These permissions were easy to provide but if the user perform delete action on root folder then nothing happen with root folder (as user has only read/write permission on it) but subfolders and files immedietly get deleted automatically. try it and you will be stunned !

Fix :-
There is no way to stop this process with NTFS permission but there is always a way to finish .. unfinished job that too with elegant manner. Here is what i did.
i created a file inside this root folder and named it (!donotdelete.txt) and removed all access rights from it.. you see the file name starts with ! and this is wildcard character, so now, whenever any user perform delete action on root folder .. a command execute to delete all subfolders and files but stuck at !donotdelete.txt because this file can't be deleted by anyone and delete command stop here itself.


Catch :- You can create any file/folder with initial letter ! to stop automatic deletion,it will work Guaranteed !.


4 comments:

  1. A useful piece of writing! You illustrated the scenario so well. It is easy to read and understand. Keep writing more I m looking forward to more of your post.

    ReplyDelete
  2. You have explained everything so well and properly. Easy for anyone to understand and so practical on their own. Keep writing more of such blog posts.

    ReplyDelete
  3. While books and Internet resources on grant writing are available, if you are serious about the field, classes and workshops conducted by experienced grant professionals will provide a more comprehensive overview of writing grants. Top Dissertation Writing Service

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete