Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to make external hard disk read only

Hi


I have an external hard disk which I store all of my iTunes on. I am trying to make it read only so I cant accidentally delete anything off it, I have tried "get info" and changed the permissions to read only but even after i've done this I can still delete things from it. Does anyone know where i'm going wrong?


Cheers


Rob

MacBook Pro, Mac OS X (10.7.1)

Posted on Sep 2, 2013 3:07 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 5, 2013 10:10 AM

Probably the most reliable way to do this is with FSTAB. This file is read by OS X whenever a disk is attached, and determines how it's handled. We can use this file to tell OS X to make the disk read-only. The following process will require admin privileges.


Launch Disk Utility, select the partition you want to make read-only and Get Info on it. You'll see a line called, "Universal Unique Identifier". The string following it will be needed later.


Now launch Terminal, make sure you're logged in as an admin user, and type:

sudo vifs

You will be asked to authenticate by entering your admin password. It will not appear as you type it. Hit enter when done. This will open a text editor called VIM, and within it the FSTAB file. Using the cursor keys, scroll down to the last line in the file, and then press:

o

That's the letter, not a zero. This will cause the cursor to move down a line, and the word, "INSERT" to appear at the foot of the screen. Now, type the following:

UUID=

Then, paste that long string from Disk Utility here; make sure there's no space between the "=" and this string. The normal copy/paste operates as before in Terminal. Then, press Tab to create a space, and enter the following, pressing tab wherever <Tab> appears:

none<Tab>hfs<Tab>ro

The final "ro" is the bit that tells OS X to mount the drive read-only.

Now, hit Escape. You should end up with a line like this:

UUID=blah     none     hfs     ro

Now, type a colon, ":", then:

x

And hit enter. The file will save itself, and VIM will close. Test the changes we made by fully ejecting and detaching your external HDD, then re-attaching it. You should find that it is read-only now. You can confirm this by typing:

mount

in Terminal, and hitting Enter. Look for the line that contains the name of your HDD, and you should see, "ro" or "read-only" listed in the brackets at the end of the line.


HTH 🙂

5 replies
Question marked as Top-ranking reply

Sep 5, 2013 10:10 AM in response to Beaker192

Probably the most reliable way to do this is with FSTAB. This file is read by OS X whenever a disk is attached, and determines how it's handled. We can use this file to tell OS X to make the disk read-only. The following process will require admin privileges.


Launch Disk Utility, select the partition you want to make read-only and Get Info on it. You'll see a line called, "Universal Unique Identifier". The string following it will be needed later.


Now launch Terminal, make sure you're logged in as an admin user, and type:

sudo vifs

You will be asked to authenticate by entering your admin password. It will not appear as you type it. Hit enter when done. This will open a text editor called VIM, and within it the FSTAB file. Using the cursor keys, scroll down to the last line in the file, and then press:

o

That's the letter, not a zero. This will cause the cursor to move down a line, and the word, "INSERT" to appear at the foot of the screen. Now, type the following:

UUID=

Then, paste that long string from Disk Utility here; make sure there's no space between the "=" and this string. The normal copy/paste operates as before in Terminal. Then, press Tab to create a space, and enter the following, pressing tab wherever <Tab> appears:

none<Tab>hfs<Tab>ro

The final "ro" is the bit that tells OS X to mount the drive read-only.

Now, hit Escape. You should end up with a line like this:

UUID=blah     none     hfs     ro

Now, type a colon, ":", then:

x

And hit enter. The file will save itself, and VIM will close. Test the changes we made by fully ejecting and detaching your external HDD, then re-attaching it. You should find that it is read-only now. You can confirm this by typing:

mount

in Terminal, and hitting Enter. Look for the line that contains the name of your HDD, and you should see, "ro" or "read-only" listed in the brackets at the end of the line.


HTH 🙂

How to make external hard disk read only

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.