Thursday, 7 September 2017

How to mount an NTFS partition read-only in Windows?


I feel like this is a really simple and fundamental function that Windows should have, but so far Google has been telling me it isn't possible. How can I mount an NTFS partition read-only in Windows?




Everett's answer works! (Thanks.)


Additional info about diskpart:




  1. If you have multiple volumes in a disk, neither detail vol nor attr vol shows the correct read-only status. It shows the read-only status of the last modified volume. Try these: sel vol 1, attr vol set readonly, sel vol 2, attr vol clear readonly, sel vol 1. Now detail vol shows that volume 1 is not read-only, but it actually is.




  2. If you modify a volume with Linux's ntfs-3g and then bring it to Windows, it cannot be mount read-only.




  3. If you run attr disk set readonly, none of the disk's volume can be mounted.





Answer




  • Switch off "automount" by running mountvol.exe /N

  • Connect disk to Windows (do not mount the disk)

  • Run diskpart

    • Enter list volume

    • Enter select volume X (where X is the correct volume number from the previous command)

    • Enter att vol set readonly

    • Enter detail vol and ensure the read-only bit is set




Now you can mount the volume and it will be read-only.


See also: http://crawlmsdn.microsoft.com/en-us/magazine/cc302206.aspx


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...