Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Lord Lien

macrumors newbie
Original poster
Jan 9, 2014
4
0
Is it possible to make USB drive Read/Only or Read/Write via the terminal?

Its one of them questions that I have been asked & don't seem to be able to find any information on.
 
How is this external formatted?

Any USB drive, any format.

My thinking is, if this can be done VIA a terminal command, you ping a internal server & get a reply everything is read only via USB. If you don't get a reply you can read/write.

I have basic scripting knowledge so writing the script to do this will not be a problem, just wondered if it was actually possible.

^^ I know, they joys of working with a client who does not understand technology! ;) lol
 
For one thing OS X can only read NTFS format without third party hacks. This because of a Microsoft limitation and them not allowing anything besides a Microsoft Windows machine.
 
How would you make a FAT drive read-only in OSX - its not possible, so I don't think you can do that with a thumb drive
 
How would you make a FAT drive read-only in OSX - its not possible, so I don't think you can do that with a thumb drive

It is possible (apparently) not going to name the vender who say that they can do this (PM if you want to know. I don't want to advertise) & I will be checking out the software this week.


** edit **
Looked at a demo of some software & it is possible (& does work, just tested it) to make external USB drives no matter what format they are read only on a MAC. Love to know what witchcraft they are using to do this.
 
Last edited:
It is possible (apparently) not going to name the vender who say that they can do this (PM if you want to know. I don't want to advertise) & I will be checking out the software this week.


** edit **
Looked at a demo of some software & it is possible (& does work, just tested it) to make external USB drives no matter what format they are read only on a MAC. Love to know what witchcraft they are using to do this.

They might be mucking with how it's being mounted.

Refer to the 'mount' command, which has an option to update(-u), and an option to mount read-only (rdonly):
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/mount.8.html

You can get a listing in Terminal of the mounted drives with this command:
Code:
mount
A volume's current mount-options are listed in parens at the end of each line.

There's more to this than just the 'mount' command, and you can screw things up very badly if you don't know what you're doing. Fair warning for the adventurous.

Without knowing the price of the software, it's hard to say if it's worthwhile. If it was a few bucks, or even maybe as much as $20, I'd probably pay for it rather than me trying to puzzle out how it's done, and possible breaking things or destroying data in the process.
 
Without knowing the price of the software, it's hard to say if it's worthwhile. If it was a few bucks, or even maybe as much as $20, I'd probably pay for it rather than me trying to puzzle out how it's done, and possible breaking things or destroying data in the process.

The client I'm working for will be happy to pay for the software/hardware its not cheap. As you pointed out doing this is not something I would have been happy doing with a "Micky Mouse home made script" either. To be honest I thought it could not be done due to the way OS X works… we live & learn.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.