View previous topic :: View next topic |
Author |
Message |
flo89 n00b

Joined: 27 Mar 2008 Posts: 29
|
Posted: Mon Oct 05, 2009 9:50 am Post subject: writeprotection for a usbstick |
|
|
Hi - i am searching for a solution to declare a usb stick as "write protected" - like a cdrom device.
in the moment you are trying to mount - the kernel drops a msg: "volume is writeprotected - mounting read only."
any idea? i do not mean, that you can lock the stick with a switch on the case. It should be a digital/software solution.
yours sincerly,
flo89
edit:\
dmesg output: Here should be a "Write Protect is On"
Quote: | sd 7:0:0:0: [sda] 1002496 512-byte hardware sectors (513 MB)
sd 7:0:0:0: [sda] Write Protect is off
sd 7:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 7:0:0:0: [sda] Assuming drive cache: write through
sd 7:0:0:0: [sda] 1002496 512-byte hardware sectors (513 MB)
sd 7:0:0:0: [sda] Write Protect is off
sd 7:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 7:0:0:0: [sda] Assuming drive cache: write through |
|
|
Back to top |
|
 |
costel78 Guru

Joined: 20 Apr 2007 Posts: 414
|
Posted: Mon Oct 05, 2009 10:41 am Post subject: |
|
|
I don't know if it fit your needs but what about use readonly (ro) option in fstab ?
Something like: /dev/[...] [mountpoint] auto ro 0 0
Of course, this restriction could be avoided using manual mount. _________________ Sorry for my English. I'm still learning this language. |
|
Back to top |
|
 |
flo89 n00b

Joined: 27 Mar 2008 Posts: 29
|
Posted: Mon Oct 05, 2009 11:02 am Post subject: |
|
|
sure - this is possible.
put i plan to use the stick on different systems and it should be unwriteable everytime.
but thank you for your try  |
|
Back to top |
|
 |
disi Veteran


Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Mon Oct 05, 2009 11:29 am Post subject: |
|
|
I have actual seen sticks with a switch on it to turn on/off write protection.
Which operating systems? If it's all NIX-like you could put on another filesystem like ext2, then set the permissions to only root can write to it? (or ntfs, but that requires the ntfs driver in linux) _________________ Gentoo on Uptime Project - Larry is a cow |
|
Back to top |
|
 |
flo89 n00b

Joined: 27 Mar 2008 Posts: 29
|
Posted: Mon Oct 05, 2009 11:52 am Post subject: |
|
|
it should protect the mbr too, so the filesystemrights are irrelevant.
is there no flag which i can set with a hex editor or sth. else? |
|
Back to top |
|
 |
Jaglover Watchman


Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
 |
flo89 n00b

Joined: 27 Mar 2008 Posts: 29
|
Posted: Mon Oct 05, 2009 1:36 pm Post subject: |
|
|
hoho - let's run a 80er virus =)
ok ehm - it does not have to protect the mbr too - it's my fault, sorry.
it could be nice to be able to protect the parition with sth. like fdisk. |
|
Back to top |
|
 |
|