Is there a way to give a USB stick "READ ONLY" attribute?

Discussion in 'other security issues & news' started by Mr. Y, Feb 25, 2008.

Thread Status:
Not open for further replies.
  1. Mr. Y

    Mr. Y Registered Member

    Joined:
    Jan 11, 2006
    Posts:
    257
    Just wondering if there is a way to give a USB stick a READ ONLY attribute? - in much the same way as you can make floppies READ ONLY.
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    9,251
    Hello,
    In Windows or Linux? Or both? Or some other OS?
    Mrk
     
  3. Mr. Y

    Mr. Y Registered Member

    Joined:
    Jan 11, 2006
    Posts:
    257
    I was thinking of Windows when I posted, but now "both".
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    9,251
    Hello,

    In Linux, it's a piece of cake:

    mount -r /dev/XXX /mount_point

    In Windows:

    I have found some links. But since these "hacks" are offered by people I don't know, I'm not sure if I can / should post it.

    Open Regedit, go here:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control

    Create a new key called StorageDevicePolicies
    Create a new value called WriteProtect
    Set it to 1

    This might work ...

    Mrk
     
  5. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    7,324
    Location:
    U.S.A. (South)
    This probably not what you want and it might get pulled although it's safe and works as an OFF/ON. Is a batch file to enable and disable USBstor in the registry then back again. I dunno any READ ONLY apps or codes ATM. Sorry, does nothing at all for the pen drive stick, but nice little switch to deny/allow USB plug entry.

     
  6. SystemJunkie

    SystemJunkie Resident Conspiracy Theorist

    Joined:
    Mar 3, 2006
    Posts:
    1,500
    Location:
    Germany
    Easter you are a batch monster coder. :D Seems to be your everyday language.
     
  7. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    7,324
    Location:
    U.S.A. (South)
    Maybe.

    But i have an even greater appetite for vbscripting which drives me to bed early some nights. Crazy about vbs i am.
     
  8. farmerlee

    farmerlee Registered Member

    Joined:
    Jul 1, 2006
    Posts:
    2,585
    the best way is to buy a usb stick which has a write protect switch, thats what i normally do. Otherwise i use 'drivesentry anywhere' which allows me to control what gets written to the flashdrive.
     
  9. MikeNAS

    MikeNAS Registered Member

    Joined:
    Sep 28, 2006
    Posts:
    697
    Location:
    FiNLAND
    Thanks EASTER. Because I can't find USB memorys where is on/off switch that code is usefull. It's easier to run script than remove sticks.
     
  10. Mr. Y

    Mr. Y Registered Member

    Joined:
    Jan 11, 2006
    Posts:
    257
    Thankyou for the replies! I will try these solutions.
     
  11. EASTER

    EASTER Registered Member

    Joined:
    Jul 28, 2007
    Posts:
    7,324
    Location:
    U.S.A. (South)
    Glad to help, i'm sure most will find it as simple useful for them as i do.
     
Loading...
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.