Is there a simple way to write protect USB drive?

Discussion in 'all things UNIX' started by mattdocs12345, Feb 17, 2014.

Thread Status:
Not open for further replies.
  1. mattdocs12345

    mattdocs12345 Registered Member

    Joined:
    Mar 23, 2013
    Posts:
    1,892
    Location:
    US
    Is there a simple way in KDE to write protect USB drive? I have permanently attached Clonezilla USB live session and I have by accident deleted files on it and broke the USB. Im just trying to prevent this accident from happening again.
     
  2. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    The question is: Who are you trying to protect it from?
     
  3. mattdocs12345

    mattdocs12345 Registered Member

    Joined:
    Mar 23, 2013
    Posts:
    1,892
    Location:
    US
    Myself.
     
  4. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    If there is no physical switch to turn on write-protect, I think it could be very hard to achieve.
     
  5. Enigm

    Enigm Registered Member

    Joined:
    Dec 11, 2008
    Posts:
    188
    Depends on how good you are at soldering -
    Almost all controllers have the capability but very few implement it these days .
    But if you can find the product-sheet for your controller you can see what legs to solder a switch onto ...
     
  6. mattdocs12345

    mattdocs12345 Registered Member

    Joined:
    Mar 23, 2013
    Posts:
    1,892
    Location:
    US
    Okay let me rephrase my question. Is there anything simple that would let me hide my USB drive from the Dolphine File manager?

    I just want to prevent myself from accidentally deleting files. I don't need malware proof read only protection.
     
  7. NormanF

    NormanF Registered Member

    Joined:
    Feb 20, 2009
    Posts:
    2,882
    Try this:

    o to the DISK PARTITION utility - press start button and type "diskpart.exe" into search, open that file and click yes if prompted by the user account control,

    In the black command prompt window type "LIST DISK"
    now look for the drive you want to write protect (I use the sizes to identify the correct drive) and note the number it has to the left

    Now type "SELECT DISK 1"
    if 1 is the drive number you want to select

    Now type "ATTRIBUTES DISK SET READONLY"
    Should say it attributes set successfully

    Now close the black command prompt window and make sure it worked by trying to move something over to it and also trying to delete a file.

    If you set your disk read only, you can read but NOT write to the disk.

    A software utility that allows you to enable/disable write protection on a USB flash drive can be found here:

    http://www.irongeek.com/i.php?page=security/thumbscrew-software-usb-write-blocker


    Good luck!
     
  8. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,224
    You can always write to the raw device or use hdparm or any other utility to cause damage. There's no truly effective way to protect from yourself really, except a bunch of maybe workarounds.

    How about you unmount the usb drive and access it only when needed?

    Mrk
     
  9. mattdocs12345

    mattdocs12345 Registered Member

    Joined:
    Mar 23, 2013
    Posts:
    1,892
    Location:
    US
    Opensuse is wierd, according to their forume usb drives are unmounted by default. However they still show up in the Dolphin file manager and when you click on them they automatically mount...

    I went to Preferences --> removable drives and i confirmed that auto mount is unchecked and grayed out.

    I just kind of want a simple utility or an option. If there isn't any then it's fine.
     
  10. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    Did being careful now work out? :rolleyes:
     
  11. WSFuser

    WSFuser Registered Member

    Joined:
    Oct 7, 2004
    Posts:
    10,639
  12. mattdocs12345

    mattdocs12345 Registered Member

    Joined:
    Mar 23, 2013
    Posts:
    1,892
    Location:
    US
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.