I am trying to remove the write protection on my USB. I run diskpart command in command prompt then it had changed read-only yes to no. But another attribute current read-only state is still yes.  DISKPART&gt; detail disk  SanDisk Cruzer Blade USB Device  Disk ID: 6CA38DCA Type   : USB Status : Online Path   : 0 Target : 0 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : Yes Read-only  : No Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No    Volume ###  Ltr  Label        Fs     Type        Size     Status     Info   ----------  ---  -----------  -----  ----------  -------  ---------  --------   Volume 7     H                FAT32  Removable   7632 MB  Healthy
123708
Three weeks ago I used  2.2 to install Windows 10 on my machine, and it has write-protected my flash drive. I’ve tried diskpart:  diskpart att disk clear readonly  clean create partition primary format fs=fat32 quick   And it kinda worked, it removed the image off the USB, but now it’s showing:  Current Read-only State : Yes Read-only  : No Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No   And I can’t format it or write on it.    The drive is a a Kingston DataTraveler G4 32GB model, without physical switches. How would I restore it back to normal (rw) state?
36854
I purchased a new SSD and installed Windows 7 64-bit from scratch. I found that my old C: drive, which is now the D: drive, had ownership by an unknown user. I found a way to change the ownerships of everything to my new user ID. However, a lot of files are now read-only, and I can't seem to get rid of the read-only attribute.  I have tried from Windows Explorer, I have tried attrib from an administrative cmd, I have tried cygwin chmod (cygstart -a=runas find . -exec chmod +w {} \;). I see numerous others with the same problem, but don't see any solutions.
16173
I have an NTFS partition. The idea is I can use this for data on either Ubuntu Mate or Windows 10 dual boot. It worked fine when I first installed Mate, but recently I no longer have the delete option when I right-click on a file or folder. The delete key does nothing. I also can't paste into the partition (Paste greyed out). It's as if the whole partition is read-only. In Gparted, the partition is marked with a key. Does this mean anything? I'm not aware of having changed anything, however, Windows recently did a big update - have they hijacked my drive?  I've read related posts, but people speak of returned errors - I have no errors, just nothing happens. Also, suggested solutions seem far too technical for what must surely be a simple tick-a-box fix!  Please note - for me the Terminal is where I get off a train and Sudo sounds like a Japanese noodle dish. ;) GUI's preferred if possible! Thanks for your patient help!
38658
So, somehow over the weekend, my 1GB USB flash drive has managed to become write-protected.  There is no switch on the stick, so I'm concluding that something has corrupted at some point.  Obviously I can't format it or remove.  The output from dmesg | tail is:  Buffer I/O error on device sdb1, logical block 328168 lost page write due to I/O error on sdb1 sd 73:0:0:0: [sdb] Unhandled sense code sd 73:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 73:0:0:0: [sdb] Sense Key : Data Protect [current] Info fld=0x0 sd 73:0:0:0: [sdb] Add. Sense: Write protected sd 73:0:0:0: [sdb] CDB: Write(10): 2a 00 00 05 08 00 00 00 01 00 Buffer I/O error on device sdb1, logical block 328200 lost page write due to I/O error on sdb1   I think the second and final lines are a giveaway to corruption, but I don't know how to interpret this output.  Could someone help to see if this output gives any indication?  I usually eject the drive before removing it, but I may have been lax once or twice.  The data isn't critical, it's just bugging me.  Any suggestions on how to fix it (if the drive even can be) would be greatly appreciated.
100964
Since yesterdays update to my Ubuntu 18.04 desktop system, all the NTFS volumes have become read-only. I haven't had time to research this fully yet; just seeing if anyone else is having the same problem. I see many old threads on this topic, but my system has been running perfectly until yesterday and there seem to be no new posts.  Permissions on those volumes looks good, but attempting to delete files or folders from Nemo fails and using rm in terminal line gives the message "read-only file system".  The system dual-boots with Windows 10 (which I use only rarely) and Windows now won't start, which may or not be related.
92141
I am trying to use my ext4 USB drive but Ubuntu 13 is currently mounting it with write permission only for root so with my normal user I can't write to it, without sudo.   The first place I checked was dconf-editor which has the following options   automount automount-open autorun-never autorun-x-content-ignore autorun-x-content-open-folder autorun-x-content-start-app   and it seems to me there should be an option in there to control if I can write to the mounted USB drive, but no.   I also made sure my user is in the relevant groups: fuse and plugdev  I've searched most of the internet and can't find a solution to change the permissions given by the mount operation. There's literally nobody out there having this problem incredibly. A ton of people have issues because their drives mounts totally read-only, but not this way with only root write permission.  I can't see any way of controlling what happens. I looked at setting the mount options using gnome-disks but drew a blank.  It's not in fstab but it does appear in the mount list or /etc/mtab:  /dev/sdb1 /media/adam/WDPassport2T ext4 rw,nosuid,nodev,uhelper=udisks2 0 0   This is what appears in syslog if it helps:  kernel: [111522.196770] usb 2-1: USB disconnect, device number 6 kernel: [111525.384020] usb 2-1: new high-speed USB device number 7 using ehci-pci kernel: [111525.565220] usb 2-1: New USB device found, idVendor=1058, idProduct=0820 kernel: [111525.565225] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5 kernel: [111525.565227] usb 2-1: Product: My Passport 0820 kernel: [111525.565229] usb 2-1: Manufacturer: Western Digital kernel: [111525.565231] usb 2-1: SerialNumber:  575832314141334A34383631 kernel: [111525.565729] usb-storage 2-1:1.0: USB Mass Storage device detected kernel: [111525.566203] scsi9 : usb-storage 2-1:1.0 mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1" mtp-probe: bus: 2, device: 7 was not an MTP device kernel: [111526.564697] scsi 9:0:0:0: Direct-Access     WD       My Passport 0820 1007 PQ: 0 ANSI: 6 kernel: [111526.565063] scsi 9:0:0:1: Enclosure         WD       SES Device       1007 PQ: 0 ANSI: 6 kernel: [111526.568096] sd 9:0:0:0: Attached scsi generic sg2 type 0 kernel: [111526.568202] ses 9:0:0:1: Attached Enclosure device kernel: [111526.568263] ses 9:0:0:1: Attached scsi generic sg3 type 13 kernel: [111531.263108] sd 9:0:0:0: [sdb] 3906963456 512-byte logical blocks: (2.00 TB/1.81 TiB) kernel: [111531.265100] sd 9:0:0:0: [sdb] Write Protect is off kernel: [111531.265105] sd 9:0:0:0: [sdb] Mode Sense: 47 00 10 08 kernel: [111531.266473] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.266479] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.272224] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.272230] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.284885]  sdb: sdb1 kernel: [111531.288219] sd 9:0:0:0: [sdb] No Caching mode page found kernel: [111531.288223] sd 9:0:0:0: [sdb] Assuming drive cache: write through kernel: [111531.288227] sd 9:0:0:0: [sdb] Attached SCSI disk kernel: [111531.751588] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null) udisksd[3131]: Mounted /dev/sdb1 at /media/adam/WDPassport2T on behalf of uid 1000
11414
I have got an external hard disk TOSHIBA 1TB USB 3, the permission is always READ ONLY.  fdisk -l (output) :  Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xf2198b37     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2046   362369023   181183489    5  Extended /dev/sda3       362371072   976771071   307200000    7  HPFS/NTFS/exFAT /dev/sda5            2048      976895      487424   83  Linux /dev/sda6          978944   362369023   180695040   83  Linux  Disk /dev/sdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xeba6fb57     Device Boot      Start         End      Blocks   Id  System /dev/sdb1           16065   312576704   156280320    f  W95 Ext'd (LBA) /dev/sdb5           16128   312573708   156278790+   7  HPFS/NTFS/exFAT  Disk /dev/sdc: 1000.2 GB, 1000204885504 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525167 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x297c35de     Device Boot      Start         End      Blocks   Id  System /dev/sdc1              63  1953520064   976760001    7  HPFS/NTFS/exFAT   How can I change the owner and permission of this hard drive ?
120759
Is there a way to perform an integrity check on a ready-to-use USB boot disk?  I just made a Lubuntu 14.04.01 boot USB, and have not been able to figure out how to run an integrity check on it.  I can't find any .iso file to run an MD5sum hash against.
86725
I think I'm going crazy. Every time I create a folder it automatically is set to readonly, but I can still then rename the folder or add folders to it. If I attempt to uncheck the readonly flag it becomes checked again when I next open the folder properties. What the heck? Could my IT dept really have set up a policy like this somehow? If so, how?  Seems crazy that Windows would even do this -- no errors when I uncheck read-only and hit ok but the change fails.  Also, it is the halfway checked state -- greyed out and checked, but uncheckable.
79045
I'm looking for a solution to write-protect the contents of a USB key. The idea is to prevent its contents from being inadvertently removed by the user or changed by malicious programs -- not to restrict the re-cycling of the key for something else.  Here is a summary of my findings so far:   Some keys have a switch which makes them read-only. Unfortunately this is not always the case.  With a FAT32 filesystem the only solution seems to be setting the files "read-only". But this protection is too weak. There is a slightly stronger write-protection available for NTFS, which can be achieved by removing write privileges from "All Users" it will make the files read-only to every account, except "Administrator". Formatting the disk as UDF makes it read-only under Windows&nbsp;XP SP3, but read-write in Windows&nbsp;Vista, Windows&nbsp;7, Linux and Mac&nbsp;OS&nbsp;X. Formatting as ISO9660/CDFS makes it read-only under Linux and Mac&nbsp;OS&nbsp;X, but unfortunately the contents are not readable anymore from Windows. With microcontroller-specific software is possible (if supported by the chip) to re-partition the key so it displays for example a write-protected and a read-write partition. The problem is that it is very confusing for the users: the write-protected partition can appear as a CD-ROM drive (which it is not), after insertion some drivers are apparently installed on the computer (in fact they are not really drivers), and it can lead to prompting for reboot. Besides, this solution cannot be applied universally because it requires knowing which chip is used in the drive, and the existence of publicly available tools to re-program the device.  John Reasor mentions utilities able to fill all free space on the device, making it impossible to create new files (see below).   Does there exist a general solution to store non-modifiable contents on a USB key?   It protects the contents from modifications typically done from the shell (e.g. delete, rename, move) or from the files and folders being modified by a standard applications (e.g. save-as) It should work with most of the devices The user can still re-format the device into a regular key to re-cycle it for another usage (for example, with )
74680
I have recently upgraded my desktop PC and installed a SSD as system drive.   I read somewhere that these drives "don't like" being written on too much and that one needs to enable/disable certain OS features for such drives.  I checked the properties for the drive C: in Windows 8 and here's what I got.      Q1: As you see Allow files on this drive to have contents indexed in addition to file properties is checked. Does it need to be checked for that drive?  Q2: Is there anything else that I need to change in the settings to accommodate for the SSD?
40165
When I plug in a removable 1TB USB disk in my laptop, the operations led keeps blinking for a while and then you can hear the servo mechanism resetting with a short "tack".  I'd like to recover the data.    I believe there might be some way to get the data through low level IOs.    What I believe is that the mounting process assumes the disk is OK and I should prevent this before using ddrescue or something similar.  Does anybody have a solution to this problem?
63646
I have a MicroSD card reader in my notebook. When I insert a MicroSD memory card into it, I can't write any data on it - it's read-only. The same thing happens when I try to do it under root. And I can't change the permission policy for it. This problem happens for all microSD cards (I've tested 2 cards). I've encountered it on Ubuntu 12.04 LTS, now I'm on Ubuntu 12.10, the problem is still on it's place. When I try to insert such a "read-only" card in my mobile phone, everything's OK and I can write data on it. So, can anybody tell me, how can I write a data onto the card?  UPD: here's fdisk -l output:  Disk /dev/sdc1: 2013 MB, 2013135360 bytes 62 heads, 62 sectors/track, 1022 cylinders, total 3931905 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000   Device Boot      Start         End      Blocks   Id  System   The file system of the card is msdos. As to me it's weird.   UPD2: I've found a small "lock" switch on my card adapter, and it turns out, that when I insert it in my notebook, it switches on. Perhaps, I have to find some glue or something to get that switch stuck...  UPD3: There was no glue near me, so I've decided to buy another card-reader.
48216
I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed: sudo dd if=/dev/zero of=/dev/sda, /dev/sda/ being the new 2 TB connected to my Raspberry Pi.  Hopefully, I cancelled the command and only 11 MB have been written. Now disk content can't show up, and now parted tell me that the partition tree is like this:  |--- unallocated 8.00 MB |--- unknown 1.82 TB |--- unallocated 9.08 MB   Before, it was like this:  |--- ext4 1.82 TB   I don't know if dd did overwrite the first 11 MB of the disk, which means that the partition table have been totally overwritten, or random bits of the hard drive have been overwritten.  Now the hard drive is connected to my Xubuntu 14.04 laptop as /dev/sdb. I've tried gpart which is still running, and also testdisk without success.  Knowing that the whole disk was ext4 and that sector size was 4096, is it possible to recover the partition table without re-formating and make me able to access my files again (even if some have been corrupted/deleted)? Or the only solution I have is to use a file recovery tool, which would be tiresome because of the amount of data to copy stored on this drive?
89270
I want to format my USB stick to ext4 and just use as I would any other typical non-linux format drive (FAT32, exFAT, NTFS).   That is to say, I want to be able to plug the usb stick into any of my linux machines, and read/write to it without needing to adjust permissions, like doing chmod or chown stuff.  I would prefer to use GUI partition software like GParted, rather than command-line commands, though I welcome any solution!  I'm sure a post like this is duplicate flag heaven for some, but after browsing 6~10 SO and forum posts from google, I didn't find a simple solution to my question. Seemed like everything was about adjusting permissions on a per-user basis. Maybe you just cannot use ext4 drives with the same brainless convenience as NTFS.
52335
If I create a file and then change its permissions to 444 (read-only), how come rm can remove it?  If I do this:  echo test &gt; test.txt chmod 444 test.txt rm test.txt   ...rm will ask if I want to remove the write-protected file test.txt. I would have expected that rm can not remove such a file and that I would have to do a chmod +w test.txt first. If I do rm -f test.txt then rm will remove the file without even asking, even though it's read-only.   Can anyone clarify? I'm using Ubuntu 12.04/bash.
24742
After writing the FreeNAS IMG to a 16 GB USB flash drive, I can now only use 938 MB. I used the Win32 Disk Imager tool to write the IMG to the device. Then later, when I inserted the the USB drive into my Windows 7 computer it said that it had to be formatted, because it couldn't read it. I believe this is normal. So I formatted it inside Windows using the format option when prompted. So in Windows Explorer now, 938 MB is reported as capacity of this device.    Also, when i check the properties dialog box I can see the same numbers.    And when I check with diskmgmt.msc I can see there are several volumes I don't recognize and unallocated space of 12.79 GB.    Now, I have another 2 GB USB flash drive with the same problem. It too was used for FreeNAS, and it too has a reported capacity of only 938 MB. I thought it was broken there for a while, until I saw the same problem with this 16 GB model.  I tried using diskpart on the 2 GB model, and I saw that there were several partitions there (list partitions) just like on this one. So I used the clean option to try to wipe it, but that wiped off everything so it's totally useless now. I'm not sure how to rebuild it.  Is this a standard routine, like part of the whole "user experience", that whenever you make a bootable USB falsh drive with FreeNAS, it messes up your device? I am new to FreeNAS, so i wouldn't know. But it sure looks like it. Maybe it is in fact the format operation in Windows that messes things up... I don't know. It's not very nice.  How do I restore the capacity back to 16 GB-ish (14.9 GiB)?