I want Drive(Volume) D to be read-only so people can view its content but no file would be altered/added/deleted. For example if a user selects a file and clicks "delete" nothing would happen.
2 Answers
Since the drive is probably being used, you need to open windows in command-prompt mode:
- While holding down the Shift key, click the restart button in the Start menu.
- Click Troubleshoot.
- Select Advanced Options
- Select Command Prompt
Now we will unmount Volume(drive) D, turn it to read-only, and remount:
- Enter
mountvolto list all the volumes. D should look something like -
\\?\Volume{b77a3ed1-0651-5gdf-90b1-d1a3672d96e4}\
D:\
You should remember which one was D for later.
- Enter
mountvol D: /pwhich will unmount D. - Enter
diskpart - Enter
list volumeand note volume D's index in the###column. Let's say it's1. - Enter
sel vol 1to select volume D. - Enter
att vol set readonlyyo make D read only. - Enter
det volto see the volume's info and confirm that D is now read only. - Enter
exitto go back to the command prompt. - Enter
mountvol D: \\?\Volume{b77a3ed1-0651-5gdf-90b1-d1a3672d96e4}\to remount D. Of course, replace the GUID-based address from this example with the one you have listed inmountvol. - reboot.
Volume D should now be read-only! No one will be able to create new files or modify existing ones and you can see that the delete option is gone when right clicking files.
You can revert this by repeating the same process and only changing step 6 to att vol clear readonly.
Enjoy!
- 473
If your Drive D volume is in a separate storage media (e.g. hard drive, SSD, USB flash drive etc.) (in diskpart: called disk) then probably OK for you to set read-only the whole storage media. (Obviously, if there are multiple volumes on this storage media, they will also be read-only.) The method is easy:
In Windows Taskbar Search Box type
diskpartand press Enter, then wait a few seconds.In diskpart enter
list diskthen you get the list of storage medias in your system, something like:
Disk ### Status Size Free Dyn Gpt
Disk 0 Online 238 GB 0 B *
Disk 1 Online 59 GB 15 MB
In this list your drive C is for example disk 0, and your drive D is for example disk 1. (You can not read drive letters in this list but you can identify your drive D about its size (capacity).)
Enter
select disk 1Enter
att disk set readonly
That's all.
To set not read-only again, enter att disk clear readonly
- 21