USB devices showing as read only












101














I am using Ubuntu 14.04.



I have an 8gb FAT32 USB stick and a 500gb FAT32 HDD; both of these have suddenly become read only devices.



I've tried deleting the directory inside /media and then creating it again, renaming it, then giving that directory full permissions. However, this didn't work.



Results of mount:



$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=simon)


Results of sudo parted -l:



Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
4 1049kB 500GB 500GB extended
5 2097kB 496GB 496GB logical ext4
6 496GB 500GB 4238MB logical linux-swap(v1)


Model: Verbatim STORE N GO (scsi)
Disk /dev/sdb: 8028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 24.6kB 8028MB 8028MB primary fat32 boot


Results of lsblk:



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 461.8G 0 part /
└─sda6 8:6 0 4G 0 part [SWAP]
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 7.5G 0 part /media/simon/LYDIA
sr0 11:0 1 1024M 0 rom


USB write test:



$ cd /media/simon/LYDIA
$ touch newfile001
touch: cannot touch ‘newfile001’: Read-only file system


Results of dmesg:



[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be       corrupt. Please run fsck.
[ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only
[ 159.383571] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384251] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384319] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.475111] systemd-hostnamed[2966]: Warning: nss-myhostname is not installed.
Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 159.480141] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480224] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480497] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480516] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2893.091767] wlan0: deauthenticating from c0:3e:0f:31:21:05 by local choice (reason=3)









share|improve this question
























  • chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
    – davidbaumann
    Dec 20 '14 at 20:03










  • I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
    – oodles2do
    Dec 20 '14 at 20:09










  • Plug in, open, and add the result of mount please.
    – davidbaumann
    Dec 20 '14 at 20:12










  • Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
    – oodles2do
    Dec 20 '14 at 20:13










  • mount exactly ;)
    – davidbaumann
    Dec 20 '14 at 20:20
















101














I am using Ubuntu 14.04.



I have an 8gb FAT32 USB stick and a 500gb FAT32 HDD; both of these have suddenly become read only devices.



I've tried deleting the directory inside /media and then creating it again, renaming it, then giving that directory full permissions. However, this didn't work.



Results of mount:



$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=simon)


Results of sudo parted -l:



Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
4 1049kB 500GB 500GB extended
5 2097kB 496GB 496GB logical ext4
6 496GB 500GB 4238MB logical linux-swap(v1)


Model: Verbatim STORE N GO (scsi)
Disk /dev/sdb: 8028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 24.6kB 8028MB 8028MB primary fat32 boot


Results of lsblk:



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 461.8G 0 part /
└─sda6 8:6 0 4G 0 part [SWAP]
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 7.5G 0 part /media/simon/LYDIA
sr0 11:0 1 1024M 0 rom


USB write test:



$ cd /media/simon/LYDIA
$ touch newfile001
touch: cannot touch ‘newfile001’: Read-only file system


Results of dmesg:



[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be       corrupt. Please run fsck.
[ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only
[ 159.383571] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384251] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384319] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.475111] systemd-hostnamed[2966]: Warning: nss-myhostname is not installed.
Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 159.480141] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480224] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480497] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480516] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2893.091767] wlan0: deauthenticating from c0:3e:0f:31:21:05 by local choice (reason=3)









share|improve this question
























  • chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
    – davidbaumann
    Dec 20 '14 at 20:03










  • I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
    – oodles2do
    Dec 20 '14 at 20:09










  • Plug in, open, and add the result of mount please.
    – davidbaumann
    Dec 20 '14 at 20:12










  • Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
    – oodles2do
    Dec 20 '14 at 20:13










  • mount exactly ;)
    – davidbaumann
    Dec 20 '14 at 20:20














101












101








101


35





I am using Ubuntu 14.04.



I have an 8gb FAT32 USB stick and a 500gb FAT32 HDD; both of these have suddenly become read only devices.



I've tried deleting the directory inside /media and then creating it again, renaming it, then giving that directory full permissions. However, this didn't work.



Results of mount:



$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=simon)


Results of sudo parted -l:



Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
4 1049kB 500GB 500GB extended
5 2097kB 496GB 496GB logical ext4
6 496GB 500GB 4238MB logical linux-swap(v1)


Model: Verbatim STORE N GO (scsi)
Disk /dev/sdb: 8028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 24.6kB 8028MB 8028MB primary fat32 boot


Results of lsblk:



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 461.8G 0 part /
└─sda6 8:6 0 4G 0 part [SWAP]
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 7.5G 0 part /media/simon/LYDIA
sr0 11:0 1 1024M 0 rom


USB write test:



$ cd /media/simon/LYDIA
$ touch newfile001
touch: cannot touch ‘newfile001’: Read-only file system


Results of dmesg:



[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be       corrupt. Please run fsck.
[ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only
[ 159.383571] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384251] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384319] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.475111] systemd-hostnamed[2966]: Warning: nss-myhostname is not installed.
Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 159.480141] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480224] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480497] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480516] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2893.091767] wlan0: deauthenticating from c0:3e:0f:31:21:05 by local choice (reason=3)









share|improve this question















I am using Ubuntu 14.04.



I have an 8gb FAT32 USB stick and a 500gb FAT32 HDD; both of these have suddenly become read only devices.



I've tried deleting the directory inside /media and then creating it again, renaming it, then giving that directory full permissions. However, this didn't work.



Results of mount:



$ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=simon)


Results of sudo parted -l:



Model: ATA ST9500325AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
4 1049kB 500GB 500GB extended
5 2097kB 496GB 496GB logical ext4
6 496GB 500GB 4238MB logical linux-swap(v1)


Model: Verbatim STORE N GO (scsi)
Disk /dev/sdb: 8028MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 24.6kB 8028MB 8028MB primary fat32 boot


Results of lsblk:



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 461.8G 0 part /
└─sda6 8:6 0 4G 0 part [SWAP]
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 7.5G 0 part /media/simon/LYDIA
sr0 11:0 1 1024M 0 rom


USB write test:



$ cd /media/simon/LYDIA
$ touch newfile001
touch: cannot touch ‘newfile001’: Read-only file system


Results of dmesg:



[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be       corrupt. Please run fsck.
[ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only
[ 159.383571] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384251] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.384319] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.475111] systemd-hostnamed[2966]: Warning: nss-myhostname is not installed.
Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 159.480141] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480224] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480497] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.480516] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 2893.091767] wlan0: deauthenticating from c0:3e:0f:31:21:05 by local choice (reason=3)






usb mount read-only






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 19 '17 at 12:17









Zanna

50.2k13133241




50.2k13133241










asked Dec 20 '14 at 20:00









oodles2dooodles2do

6332811




6332811












  • chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
    – davidbaumann
    Dec 20 '14 at 20:03










  • I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
    – oodles2do
    Dec 20 '14 at 20:09










  • Plug in, open, and add the result of mount please.
    – davidbaumann
    Dec 20 '14 at 20:12










  • Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
    – oodles2do
    Dec 20 '14 at 20:13










  • mount exactly ;)
    – davidbaumann
    Dec 20 '14 at 20:20


















  • chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
    – davidbaumann
    Dec 20 '14 at 20:03










  • I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
    – oodles2do
    Dec 20 '14 at 20:09










  • Plug in, open, and add the result of mount please.
    – davidbaumann
    Dec 20 '14 at 20:12










  • Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
    – oodles2do
    Dec 20 '14 at 20:13










  • mount exactly ;)
    – davidbaumann
    Dec 20 '14 at 20:20
















chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
– davidbaumann
Dec 20 '14 at 20:03




chown it, when mounted? How do you mount it? As root? Auto-mount with the file manager's automount?
– davidbaumann
Dec 20 '14 at 20:03












I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
– oodles2do
Dec 20 '14 at 20:09




I normally plug the usb sticks in and then either the window pops up or it's available for me to open and drag and drop files into. I don't normally use the terminal for any copying or anything like that.
– oodles2do
Dec 20 '14 at 20:09












Plug in, open, and add the result of mount please.
– davidbaumann
Dec 20 '14 at 20:12




Plug in, open, and add the result of mount please.
– davidbaumann
Dec 20 '14 at 20:12












Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
– oodles2do
Dec 20 '14 at 20:13




Don't mean to sound stupid, but what exactly do you mean? What code shall I put into the terminal? If that's what you mean to do it in. Thanks!
– oodles2do
Dec 20 '14 at 20:13












mount exactly ;)
– davidbaumann
Dec 20 '14 at 20:20




mount exactly ;)
– davidbaumann
Dec 20 '14 at 20:20










12 Answers
12






active

oldest

votes


















199














See this bug.



Run this command to kill Nautilus (Files):



killall nautilus





share|improve this answer



















  • 36




    Wow, I cannot believe that worked
    – JeD
    Oct 22 '17 at 19:52






  • 10




    I'll be damned, this works haha
    – Tek
    Nov 25 '17 at 0:00






  • 4




    heh, it worked!
    – John Doe
    Dec 6 '17 at 19:22






  • 5




    I'm using nemo, so I did killall nemo and it works.
    – Oki Erie Rinaldi
    Jan 27 '18 at 4:19








  • 8




    It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
    – Andrew
    Feb 17 '18 at 19:09



















67














When you attach your USB key to your laptop:




  • run sudo -i (so that you won't type your password all the time)

  • run df -Th(to see where your USB stick is mounted)

  • unmount your USB stick

  • run dosfsck on the device you saw from your previous command. Example: dosfsck /dev/sdc1

  • remove and reattach your USB stick


Problem should be solved now.



Now, for your HDD, please follow the answer to this question. It is about an external HDD but it is the same thing for your case.






share|improve this answer



















  • 1




    Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
    – oodles2do
    Dec 20 '14 at 20:35






  • 3




    @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
    – user284234
    Dec 20 '14 at 20:37






  • 22




    Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
    – oodles2do
    Dec 20 '14 at 20:40






  • 3




    Sometimes the easiest thing to do is to restart
    – Gayan Weerakutti
    Feb 19 '16 at 5:35






  • 2




    It would be useful to add to the answer that a reboot is indeed needed.
    – Artem Pelenitsyn
    Jul 25 '17 at 22:03





















19














I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only".



But under root copying worked fine...



Issue was gone after machine restart. So I guess that this problem may occur when using GParted.






share|improve this answer





















  • See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
    – Antonio
    Mar 23 '18 at 14:14



















14














I had this problem too. I got an error while copying to my usb stick, I am using Mint 17.1 cinnamon, kernel 3.13.0-43 with caja file manager.



When I looked at the media directory in terminal 'dir /media' I saw that the layout has changed, normally you expect to see the drives listed here, but now they are listed under your username, and guess what? That username has only ROOT permissions.



What I did was to type



sudo chown [username] /media/[username]


and



sudo chgrp [username] /media/[username]


where you replace [username] with your user name, removed the usb stick, waited and then put it back in, problem solved, I can now write to it!






share|improve this answer























  • For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
    – Nicolas
    Apr 4 '17 at 9:14










  • Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
    – agim
    Apr 9 '17 at 9:27










  • chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
    – Xen2050
    May 5 '17 at 2:44








  • 1




    @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
    – Lucas
    May 5 '17 at 3:23










  • @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
    – Xen2050
    May 5 '17 at 3:41



















9














I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried:




  • Format the device using GParted. I even tried re-creating the
    partition table, without success.

  • Check the device with fsck. No issues were found.

  • Fixed the permissions of the mount point. Turns out that the mount point was root owned, but even after making myself the owner, I could only write to the device from the command-line (I still could not create files from the GUI).


When I connect a USB stick, it gets mounted under /media/<username>/<label>/, where <username> is my username and <label> is the label of the USB stick or storage device.



I looked again at the permissions:



$ ls -ld /media/<username>
drwxrwx---+ 2 <username> <username> 4096 Mar 4 18:32 /media/<username>


Notice the + at the end of the permissions. That's new to me and I never noticed it before. It means the directory has extended permissions called Access Control List (ACL) (see this related question). I listed the ACL details for this directory:



$ getfacl /media/<username>
# file: <username>/
# owner: <username>
# group: <username>
user::rwx
user:<username>:r-x
group::---
mask::r-x
other::---


As you can see, there is an additional entry user:<username>:r-x for my username, which only gives me read access. I fixed this with a simple command:



setfacl -m u:<username>:rwx /media/<username>


I detached my USB devide, attached it again, and the problem was solved.






share|improve this answer



















  • 1




    OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
    – Antonio
    Mar 23 '18 at 14:11





















9














I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.






share|improve this answer



















  • 1




    Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
    – vskubriev
    Dec 12 '16 at 13:17






  • 1




    I think this answer is a stub. Please, expand it.
    – Léo Léopold Hertz 준영
    Jan 28 '17 at 12:49



















5














When you ran mount only sda5 (your /) was mounted, and it was read-write (rw) so you should be able to write to it. Normally, most of the directories like /sys, /bin are only writeable by root (you'd need sudo first), but your home folder should be writeable to your regular user.



Can you create any files in your home folder? Maybe your gui file manager is stuck thinking they're read-only, if you try in a terminal does it work? For example, do these commands work?:



cd ~
touch newfile001
echo stuff >> newfile001
cat newfile001


If those work successfully then you can write to your HD (sda5).





For the USB drive, after it's plugged in and mounted, look at mount to find it (the /dev/sdb1 ... line) and see if the mount option in the ()'s is rw (read-write) then you should be able to write to it. If it's ro (read-only) try this and see if it changes:



sudo mount -o remount,rw /dev/sdb1 /media/simon/LYDIA


If the filesystem (fs) has errors it may get mounted as ro, there should be messages about it in dmesg & /var/log/syslog too. This is what your logs show:



[  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may  
be corrupt. Please run fsck.
[ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only


That includes a clue to how the fs could have gotten corrupted - "not properly unmounted", you should always unmount before unplugging anything. Most file managers have an "eject" to help with that.



The dmesg log also say how to fix it: fsck can try to fix fs errors, it attempts to pick the right check program, or you can pick one explicitly with fsck.vfat or fsck.[other] pressing TAB after fsck. should list options.




  • For a FAT system (often have to run it twice, doesn't always fix all errors the first time)


    • fsck.vfat -vaV [device] should work automatically (-a) & display more info (-v) & do a "verification" pass (-V), or just:

    • fsck.vfat -a [device]




NOTE: This will not guarantee that the filesystem will stay fixed, it could get corrupted again & it may be impossible to know exactly why. Always unmount / "eject" before removing USB drives.



Note if a fs mounts as rw, but then errors are seen & it gets automatically remounted as ro, the mount command may still report it's mounted rw. Looking at this file with less /proc/mounts should usually show more reliable information (see man mount).





If something is mounted rw but you still can't add/delete/edit files on it, you may not be the owner of the files. In some fs's you can chown to become the owner, but a FAT32 fs like on sdb1 doesn't have those permissions; they're set when it mounts with the mount option uid=value (value is your userid, learn it with echo $UID or id -u) then you can try this & see if it works afterwards:



sudo mount -o remount,rw,uid=[userid] /dev/sdb1 /media/simon/LYDIA



  • Note: Sometimes, you may need to restart your gui file manager to get it to "notice" the mount change that lets you write to the filesystem/drive, but a terminal should always work.


Or if the above doesn't work, try sudo su to "become" root, to see if anything can write to files on the USB (with touch, echo, etc)?






share|improve this answer























  • Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
    – oodles2do
    Dec 20 '14 at 21:40










  • At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
    – Xen2050
    Dec 20 '14 at 21:47










  • How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
    – oodles2do
    Dec 20 '14 at 21:58










  • If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
    – Xen2050
    Dec 20 '14 at 22:30










  • Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
    – oodles2do
    Dec 21 '14 at 9:42



















4














Goto Disks.



Select your USB drive.



Click on Additional partition options and select Format Partition.



Then select erase Overwrite existing data with zeroes(slow) and type FAT.



I have tried many things after searching on internet but this worked for me.






share|improve this answer

















  • 1




    This'll erase all data on the drive.
    – cst1992
    Jul 21 '17 at 21:30










  • What if I need NTFS? The same for NTFS did not work for me.
    – Vadim Kotov
    May 28 '18 at 12:19





















0














Quick fix methods:



Method 1



Sometimes we can accomplish the task from bash without trouble
I usually do (no sudo required)



mkdir /media/$USER/mydrive/myfolder
cp -r src/ /media/$USER/mydrive/myfolder


However, sometimes, when I need to use file browser,



sudo nautilus /media/$USER/mydrive/


Note: this is a quick fix, use it only if you get frustrated because no other answers above worked



Method 2



Reboot OS






share|improve this answer































    0














    As like in wayofthefuture's answer above when you're using Nemo (like me, if you use the Cinnamon desktop environment) try:



    killall nemo





    share|improve this answer































      0














      try below strategies





      1. edit /etc/fuse.conf as superuser



        change #user_allow_other to user_allow_other




      2. enable write support for external devices





        • sudo apt-get install ntfs-config

        • sudo ntfs-config








      share|improve this answer





























        0














        This is because your file system is NTFS and it is in an unsafe stat, maybe you are using your disk in windows, one of the reasons is that you hibernated the windows or fast restarted it., so use one of these steps:





        1. unmount the media using the below command, go to windows (maybe Dual boot mode or maybe in an another computer) and shut down the windows completely, not hibernate or fast restart,



          sudo umount /media/"your media label"




        then come to Linux again and mount your media using this command:



        'sudo mount -o rw,mount /your media'




        1. if you are using macOs , plug your media to your mac device and use this command:



          'sudo /usr/sbin/diskutil disableJournal /Volumes/name-of-media'








        share|improve this answer





















          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f563764%2fusb-devices-showing-as-read-only%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          12 Answers
          12






          active

          oldest

          votes








          12 Answers
          12






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          199














          See this bug.



          Run this command to kill Nautilus (Files):



          killall nautilus





          share|improve this answer



















          • 36




            Wow, I cannot believe that worked
            – JeD
            Oct 22 '17 at 19:52






          • 10




            I'll be damned, this works haha
            – Tek
            Nov 25 '17 at 0:00






          • 4




            heh, it worked!
            – John Doe
            Dec 6 '17 at 19:22






          • 5




            I'm using nemo, so I did killall nemo and it works.
            – Oki Erie Rinaldi
            Jan 27 '18 at 4:19








          • 8




            It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
            – Andrew
            Feb 17 '18 at 19:09
















          199














          See this bug.



          Run this command to kill Nautilus (Files):



          killall nautilus





          share|improve this answer



















          • 36




            Wow, I cannot believe that worked
            – JeD
            Oct 22 '17 at 19:52






          • 10




            I'll be damned, this works haha
            – Tek
            Nov 25 '17 at 0:00






          • 4




            heh, it worked!
            – John Doe
            Dec 6 '17 at 19:22






          • 5




            I'm using nemo, so I did killall nemo and it works.
            – Oki Erie Rinaldi
            Jan 27 '18 at 4:19








          • 8




            It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
            – Andrew
            Feb 17 '18 at 19:09














          199












          199








          199






          See this bug.



          Run this command to kill Nautilus (Files):



          killall nautilus





          share|improve this answer














          See this bug.



          Run this command to kill Nautilus (Files):



          killall nautilus






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 6 '18 at 1:25









          wjandrea

          8,47842259




          8,47842259










          answered Sep 9 '17 at 21:11









          wayofthefuturewayofthefuture

          2,5461710




          2,5461710








          • 36




            Wow, I cannot believe that worked
            – JeD
            Oct 22 '17 at 19:52






          • 10




            I'll be damned, this works haha
            – Tek
            Nov 25 '17 at 0:00






          • 4




            heh, it worked!
            – John Doe
            Dec 6 '17 at 19:22






          • 5




            I'm using nemo, so I did killall nemo and it works.
            – Oki Erie Rinaldi
            Jan 27 '18 at 4:19








          • 8




            It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
            – Andrew
            Feb 17 '18 at 19:09














          • 36




            Wow, I cannot believe that worked
            – JeD
            Oct 22 '17 at 19:52






          • 10




            I'll be damned, this works haha
            – Tek
            Nov 25 '17 at 0:00






          • 4




            heh, it worked!
            – John Doe
            Dec 6 '17 at 19:22






          • 5




            I'm using nemo, so I did killall nemo and it works.
            – Oki Erie Rinaldi
            Jan 27 '18 at 4:19








          • 8




            It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
            – Andrew
            Feb 17 '18 at 19:09








          36




          36




          Wow, I cannot believe that worked
          – JeD
          Oct 22 '17 at 19:52




          Wow, I cannot believe that worked
          – JeD
          Oct 22 '17 at 19:52




          10




          10




          I'll be damned, this works haha
          – Tek
          Nov 25 '17 at 0:00




          I'll be damned, this works haha
          – Tek
          Nov 25 '17 at 0:00




          4




          4




          heh, it worked!
          – John Doe
          Dec 6 '17 at 19:22




          heh, it worked!
          – John Doe
          Dec 6 '17 at 19:22




          5




          5




          I'm using nemo, so I did killall nemo and it works.
          – Oki Erie Rinaldi
          Jan 27 '18 at 4:19






          I'm using nemo, so I did killall nemo and it works.
          – Oki Erie Rinaldi
          Jan 27 '18 at 4:19






          8




          8




          It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
          – Andrew
          Feb 17 '18 at 19:09




          It's sad that still works in 2018 (Ubuntu 16.04.3 LTS)
          – Andrew
          Feb 17 '18 at 19:09













          67














          When you attach your USB key to your laptop:




          • run sudo -i (so that you won't type your password all the time)

          • run df -Th(to see where your USB stick is mounted)

          • unmount your USB stick

          • run dosfsck on the device you saw from your previous command. Example: dosfsck /dev/sdc1

          • remove and reattach your USB stick


          Problem should be solved now.



          Now, for your HDD, please follow the answer to this question. It is about an external HDD but it is the same thing for your case.






          share|improve this answer



















          • 1




            Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
            – oodles2do
            Dec 20 '14 at 20:35






          • 3




            @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
            – user284234
            Dec 20 '14 at 20:37






          • 22




            Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
            – oodles2do
            Dec 20 '14 at 20:40






          • 3




            Sometimes the easiest thing to do is to restart
            – Gayan Weerakutti
            Feb 19 '16 at 5:35






          • 2




            It would be useful to add to the answer that a reboot is indeed needed.
            – Artem Pelenitsyn
            Jul 25 '17 at 22:03


















          67














          When you attach your USB key to your laptop:




          • run sudo -i (so that you won't type your password all the time)

          • run df -Th(to see where your USB stick is mounted)

          • unmount your USB stick

          • run dosfsck on the device you saw from your previous command. Example: dosfsck /dev/sdc1

          • remove and reattach your USB stick


          Problem should be solved now.



          Now, for your HDD, please follow the answer to this question. It is about an external HDD but it is the same thing for your case.






          share|improve this answer



















          • 1




            Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
            – oodles2do
            Dec 20 '14 at 20:35






          • 3




            @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
            – user284234
            Dec 20 '14 at 20:37






          • 22




            Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
            – oodles2do
            Dec 20 '14 at 20:40






          • 3




            Sometimes the easiest thing to do is to restart
            – Gayan Weerakutti
            Feb 19 '16 at 5:35






          • 2




            It would be useful to add to the answer that a reboot is indeed needed.
            – Artem Pelenitsyn
            Jul 25 '17 at 22:03
















          67












          67








          67






          When you attach your USB key to your laptop:




          • run sudo -i (so that you won't type your password all the time)

          • run df -Th(to see where your USB stick is mounted)

          • unmount your USB stick

          • run dosfsck on the device you saw from your previous command. Example: dosfsck /dev/sdc1

          • remove and reattach your USB stick


          Problem should be solved now.



          Now, for your HDD, please follow the answer to this question. It is about an external HDD but it is the same thing for your case.






          share|improve this answer














          When you attach your USB key to your laptop:




          • run sudo -i (so that you won't type your password all the time)

          • run df -Th(to see where your USB stick is mounted)

          • unmount your USB stick

          • run dosfsck on the device you saw from your previous command. Example: dosfsck /dev/sdc1

          • remove and reattach your USB stick


          Problem should be solved now.



          Now, for your HDD, please follow the answer to this question. It is about an external HDD but it is the same thing for your case.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 5 '18 at 14:55









          Community

          1




          1










          answered Dec 20 '14 at 20:28







          user284234















          • 1




            Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
            – oodles2do
            Dec 20 '14 at 20:35






          • 3




            @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
            – user284234
            Dec 20 '14 at 20:37






          • 22




            Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
            – oodles2do
            Dec 20 '14 at 20:40






          • 3




            Sometimes the easiest thing to do is to restart
            – Gayan Weerakutti
            Feb 19 '16 at 5:35






          • 2




            It would be useful to add to the answer that a reboot is indeed needed.
            – Artem Pelenitsyn
            Jul 25 '17 at 22:03
















          • 1




            Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
            – oodles2do
            Dec 20 '14 at 20:35






          • 3




            @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
            – user284234
            Dec 20 '14 at 20:37






          • 22




            Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
            – oodles2do
            Dec 20 '14 at 20:40






          • 3




            Sometimes the easiest thing to do is to restart
            – Gayan Weerakutti
            Feb 19 '16 at 5:35






          • 2




            It would be useful to add to the answer that a reboot is indeed needed.
            – Artem Pelenitsyn
            Jul 25 '17 at 22:03










          1




          1




          Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
          – oodles2do
          Dec 20 '14 at 20:35




          Thanks for your help! I tried to do what you said, is typing umount /dev/sdb1 correct for unmounting my usb stick? Also, I don't know how to use dosfsck. Thanks for the link too
          – oodles2do
          Dec 20 '14 at 20:35




          3




          3




          @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
          – user284234
          Dec 20 '14 at 20:37




          @SimonBremford if your USB is mounted in /dev/sdb1 of course your command is right. For your other question, just type: dosfsck -a /dev/sdb1
          – user284234
          Dec 20 '14 at 20:37




          22




          22




          Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
          – oodles2do
          Dec 20 '14 at 20:40




          Thanks for your help, however it didn't work. The usb stick is read only still. I think it's an issue with Ubuntu rather than the usb stick itself, seeing as it was so sudden. And the fact that it's affected more than one usb device at the same time.
          – oodles2do
          Dec 20 '14 at 20:40




          3




          3




          Sometimes the easiest thing to do is to restart
          – Gayan Weerakutti
          Feb 19 '16 at 5:35




          Sometimes the easiest thing to do is to restart
          – Gayan Weerakutti
          Feb 19 '16 at 5:35




          2




          2




          It would be useful to add to the answer that a reboot is indeed needed.
          – Artem Pelenitsyn
          Jul 25 '17 at 22:03






          It would be useful to add to the answer that a reboot is indeed needed.
          – Artem Pelenitsyn
          Jul 25 '17 at 22:03













          19














          I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only".



          But under root copying worked fine...



          Issue was gone after machine restart. So I guess that this problem may occur when using GParted.






          share|improve this answer





















          • See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
            – Antonio
            Mar 23 '18 at 14:14
















          19














          I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only".



          But under root copying worked fine...



          Issue was gone after machine restart. So I guess that this problem may occur when using GParted.






          share|improve this answer





















          • See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
            – Antonio
            Mar 23 '18 at 14:14














          19












          19








          19






          I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only".



          But under root copying worked fine...



          Issue was gone after machine restart. So I guess that this problem may occur when using GParted.






          share|improve this answer












          I got the same error when using GParted to set partition table and format my USB stick.. after that all USB drives went to "read-only".



          But under root copying worked fine...



          Issue was gone after machine restart. So I guess that this problem may occur when using GParted.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 7 '16 at 20:11









          KoyotKoyot

          19112




          19112












          • See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
            – Antonio
            Mar 23 '18 at 14:14


















          • See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
            – Antonio
            Mar 23 '18 at 14:14
















          See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
          – Antonio
          Mar 23 '18 at 14:14




          See the working solution below posted by Serrano and my comment about it. As well for me the origin came from using GPated ...
          – Antonio
          Mar 23 '18 at 14:14











          14














          I had this problem too. I got an error while copying to my usb stick, I am using Mint 17.1 cinnamon, kernel 3.13.0-43 with caja file manager.



          When I looked at the media directory in terminal 'dir /media' I saw that the layout has changed, normally you expect to see the drives listed here, but now they are listed under your username, and guess what? That username has only ROOT permissions.



          What I did was to type



          sudo chown [username] /media/[username]


          and



          sudo chgrp [username] /media/[username]


          where you replace [username] with your user name, removed the usb stick, waited and then put it back in, problem solved, I can now write to it!






          share|improve this answer























          • For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
            – Nicolas
            Apr 4 '17 at 9:14










          • Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
            – agim
            Apr 9 '17 at 9:27










          • chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
            – Xen2050
            May 5 '17 at 2:44








          • 1




            @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
            – Lucas
            May 5 '17 at 3:23










          • @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
            – Xen2050
            May 5 '17 at 3:41
















          14














          I had this problem too. I got an error while copying to my usb stick, I am using Mint 17.1 cinnamon, kernel 3.13.0-43 with caja file manager.



          When I looked at the media directory in terminal 'dir /media' I saw that the layout has changed, normally you expect to see the drives listed here, but now they are listed under your username, and guess what? That username has only ROOT permissions.



          What I did was to type



          sudo chown [username] /media/[username]


          and



          sudo chgrp [username] /media/[username]


          where you replace [username] with your user name, removed the usb stick, waited and then put it back in, problem solved, I can now write to it!






          share|improve this answer























          • For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
            – Nicolas
            Apr 4 '17 at 9:14










          • Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
            – agim
            Apr 9 '17 at 9:27










          • chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
            – Xen2050
            May 5 '17 at 2:44








          • 1




            @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
            – Lucas
            May 5 '17 at 3:23










          • @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
            – Xen2050
            May 5 '17 at 3:41














          14












          14








          14






          I had this problem too. I got an error while copying to my usb stick, I am using Mint 17.1 cinnamon, kernel 3.13.0-43 with caja file manager.



          When I looked at the media directory in terminal 'dir /media' I saw that the layout has changed, normally you expect to see the drives listed here, but now they are listed under your username, and guess what? That username has only ROOT permissions.



          What I did was to type



          sudo chown [username] /media/[username]


          and



          sudo chgrp [username] /media/[username]


          where you replace [username] with your user name, removed the usb stick, waited and then put it back in, problem solved, I can now write to it!






          share|improve this answer














          I had this problem too. I got an error while copying to my usb stick, I am using Mint 17.1 cinnamon, kernel 3.13.0-43 with caja file manager.



          When I looked at the media directory in terminal 'dir /media' I saw that the layout has changed, normally you expect to see the drives listed here, but now they are listed under your username, and guess what? That username has only ROOT permissions.



          What I did was to type



          sudo chown [username] /media/[username]


          and



          sudo chgrp [username] /media/[username]


          where you replace [username] with your user name, removed the usb stick, waited and then put it back in, problem solved, I can now write to it!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 5 '17 at 13:28









          sudodus

          23k32874




          23k32874










          answered Jun 7 '15 at 9:23









          hillsongperthhillsongperth

          14319




          14319












          • For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
            – Nicolas
            Apr 4 '17 at 9:14










          • Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
            – agim
            Apr 9 '17 at 9:27










          • chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
            – Xen2050
            May 5 '17 at 2:44








          • 1




            @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
            – Lucas
            May 5 '17 at 3:23










          • @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
            – Xen2050
            May 5 '17 at 3:41


















          • For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
            – Nicolas
            Apr 4 '17 at 9:14










          • Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
            – agim
            Apr 9 '17 at 9:27










          • chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
            – Xen2050
            May 5 '17 at 2:44








          • 1




            @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
            – Lucas
            May 5 '17 at 3:23










          • @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
            – Xen2050
            May 5 '17 at 3:41
















          For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
          – Nicolas
          Apr 4 '17 at 9:14




          For me sudo chown [username] /media/[username] worked fine. I even did not have to take the usb stick out and in (nor did I need chgrp - I am on Xubuntu 16.04)
          – Nicolas
          Apr 4 '17 at 9:14












          Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
          – agim
          Apr 9 '17 at 9:27




          Thanks for your answer.. this should be the accepted answer, since there is not really a problem with the media itself but with the mounting point.
          – agim
          Apr 9 '17 at 9:27












          chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
          – Xen2050
          May 5 '17 at 2:44






          chown can change the group too, chown [username]:[groupname] files is equivalent to running chown and then chgrp. See man chown
          – Xen2050
          May 5 '17 at 2:44






          1




          1




          @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
          – Lucas
          May 5 '17 at 3:23




          @Xen2050, even better is chown [username]: files since `chown`` will default to the users login group.
          – Lucas
          May 5 '17 at 3:23












          @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
          – Xen2050
          May 5 '17 at 3:41




          @Lucas thanks that is better. It's cleverly hidden in the man page, but visible in the info page [would be really nice if man & info pages matched...]
          – Xen2050
          May 5 '17 at 3:41











          9














          I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried:




          • Format the device using GParted. I even tried re-creating the
            partition table, without success.

          • Check the device with fsck. No issues were found.

          • Fixed the permissions of the mount point. Turns out that the mount point was root owned, but even after making myself the owner, I could only write to the device from the command-line (I still could not create files from the GUI).


          When I connect a USB stick, it gets mounted under /media/<username>/<label>/, where <username> is my username and <label> is the label of the USB stick or storage device.



          I looked again at the permissions:



          $ ls -ld /media/<username>
          drwxrwx---+ 2 <username> <username> 4096 Mar 4 18:32 /media/<username>


          Notice the + at the end of the permissions. That's new to me and I never noticed it before. It means the directory has extended permissions called Access Control List (ACL) (see this related question). I listed the ACL details for this directory:



          $ getfacl /media/<username>
          # file: <username>/
          # owner: <username>
          # group: <username>
          user::rwx
          user:<username>:r-x
          group::---
          mask::r-x
          other::---


          As you can see, there is an additional entry user:<username>:r-x for my username, which only gives me read access. I fixed this with a simple command:



          setfacl -m u:<username>:rwx /media/<username>


          I detached my USB devide, attached it again, and the problem was solved.






          share|improve this answer



















          • 1




            OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
            – Antonio
            Mar 23 '18 at 14:11


















          9














          I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried:




          • Format the device using GParted. I even tried re-creating the
            partition table, without success.

          • Check the device with fsck. No issues were found.

          • Fixed the permissions of the mount point. Turns out that the mount point was root owned, but even after making myself the owner, I could only write to the device from the command-line (I still could not create files from the GUI).


          When I connect a USB stick, it gets mounted under /media/<username>/<label>/, where <username> is my username and <label> is the label of the USB stick or storage device.



          I looked again at the permissions:



          $ ls -ld /media/<username>
          drwxrwx---+ 2 <username> <username> 4096 Mar 4 18:32 /media/<username>


          Notice the + at the end of the permissions. That's new to me and I never noticed it before. It means the directory has extended permissions called Access Control List (ACL) (see this related question). I listed the ACL details for this directory:



          $ getfacl /media/<username>
          # file: <username>/
          # owner: <username>
          # group: <username>
          user::rwx
          user:<username>:r-x
          group::---
          mask::r-x
          other::---


          As you can see, there is an additional entry user:<username>:r-x for my username, which only gives me read access. I fixed this with a simple command:



          setfacl -m u:<username>:rwx /media/<username>


          I detached my USB devide, attached it again, and the problem was solved.






          share|improve this answer



















          • 1




            OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
            – Antonio
            Mar 23 '18 at 14:11
















          9












          9








          9






          I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried:




          • Format the device using GParted. I even tried re-creating the
            partition table, without success.

          • Check the device with fsck. No issues were found.

          • Fixed the permissions of the mount point. Turns out that the mount point was root owned, but even after making myself the owner, I could only write to the device from the command-line (I still could not create files from the GUI).


          When I connect a USB stick, it gets mounted under /media/<username>/<label>/, where <username> is my username and <label> is the label of the USB stick or storage device.



          I looked again at the permissions:



          $ ls -ld /media/<username>
          drwxrwx---+ 2 <username> <username> 4096 Mar 4 18:32 /media/<username>


          Notice the + at the end of the permissions. That's new to me and I never noticed it before. It means the directory has extended permissions called Access Control List (ACL) (see this related question). I listed the ACL details for this directory:



          $ getfacl /media/<username>
          # file: <username>/
          # owner: <username>
          # group: <username>
          user::rwx
          user:<username>:r-x
          group::---
          mask::r-x
          other::---


          As you can see, there is an additional entry user:<username>:r-x for my username, which only gives me read access. I fixed this with a simple command:



          setfacl -m u:<username>:rwx /media/<username>


          I detached my USB devide, attached it again, and the problem was solved.






          share|improve this answer














          I've been having the same problem on Ubuntu, and none of the answers given here so far worked for me. Here's what I tried:




          • Format the device using GParted. I even tried re-creating the
            partition table, without success.

          • Check the device with fsck. No issues were found.

          • Fixed the permissions of the mount point. Turns out that the mount point was root owned, but even after making myself the owner, I could only write to the device from the command-line (I still could not create files from the GUI).


          When I connect a USB stick, it gets mounted under /media/<username>/<label>/, where <username> is my username and <label> is the label of the USB stick or storage device.



          I looked again at the permissions:



          $ ls -ld /media/<username>
          drwxrwx---+ 2 <username> <username> 4096 Mar 4 18:32 /media/<username>


          Notice the + at the end of the permissions. That's new to me and I never noticed it before. It means the directory has extended permissions called Access Control List (ACL) (see this related question). I listed the ACL details for this directory:



          $ getfacl /media/<username>
          # file: <username>/
          # owner: <username>
          # group: <username>
          user::rwx
          user:<username>:r-x
          group::---
          mask::r-x
          other::---


          As you can see, there is an additional entry user:<username>:r-x for my username, which only gives me read access. I fixed this with a simple command:



          setfacl -m u:<username>:rwx /media/<username>


          I detached my USB devide, attached it again, and the problem was solved.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Apr 13 '17 at 12:14









          Community

          1




          1










          answered Mar 4 '17 at 17:56









          SerranoSerrano

          1,2561215




          1,2561215








          • 1




            OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
            – Antonio
            Mar 23 '18 at 14:11
















          • 1




            OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
            – Antonio
            Mar 23 '18 at 14:11










          1




          1




          OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
          – Antonio
          Mar 23 '18 at 14:11






          OK. Thanks, this was the solution. However at the end you need to restart your computer in order to have full access to the mounted USBs. Another point worth it I believe, this problem occured after creating a new gpt partition table on a USB stick with GParted. Subsequently all of my USBs were affected. Definitely the guys at GParted should behave differently ...
          – Antonio
          Mar 23 '18 at 14:11













          9














          I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.






          share|improve this answer



















          • 1




            Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
            – vskubriev
            Dec 12 '16 at 13:17






          • 1




            I think this answer is a stub. Please, expand it.
            – Léo Léopold Hertz 준영
            Jan 28 '17 at 12:49
















          9














          I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.






          share|improve this answer



















          • 1




            Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
            – vskubriev
            Dec 12 '16 at 13:17






          • 1




            I think this answer is a stub. Please, expand it.
            – Léo Léopold Hertz 준영
            Jan 28 '17 at 12:49














          9












          9








          9






          I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.






          share|improve this answer














          I formatted using Gparted. That wiped all data in the disk and it turns out it also fixed the problem.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 7 '18 at 20:50









          Community

          1




          1










          answered Jul 7 '16 at 14:48









          Adrian LopezAdrian Lopez

          226211




          226211








          • 1




            Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
            – vskubriev
            Dec 12 '16 at 13:17






          • 1




            I think this answer is a stub. Please, expand it.
            – Léo Léopold Hertz 준영
            Jan 28 '17 at 12:49














          • 1




            Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
            – vskubriev
            Dec 12 '16 at 13:17






          • 1




            I think this answer is a stub. Please, expand it.
            – Léo Léopold Hertz 준영
            Jan 28 '17 at 12:49








          1




          1




          Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
          – vskubriev
          Dec 12 '16 at 13:17




          Yeah, that works. You must create a new partiton table as msdos type, and then create a one big parititon with fat32.
          – vskubriev
          Dec 12 '16 at 13:17




          1




          1




          I think this answer is a stub. Please, expand it.
          – Léo Léopold Hertz 준영
          Jan 28 '17 at 12:49




          I think this answer is a stub. Please, expand it.
          – Léo Léopold Hertz 준영
          Jan 28 '17 at 12:49











          5














          When you ran mount only sda5 (your /) was mounted, and it was read-write (rw) so you should be able to write to it. Normally, most of the directories like /sys, /bin are only writeable by root (you'd need sudo first), but your home folder should be writeable to your regular user.



          Can you create any files in your home folder? Maybe your gui file manager is stuck thinking they're read-only, if you try in a terminal does it work? For example, do these commands work?:



          cd ~
          touch newfile001
          echo stuff >> newfile001
          cat newfile001


          If those work successfully then you can write to your HD (sda5).





          For the USB drive, after it's plugged in and mounted, look at mount to find it (the /dev/sdb1 ... line) and see if the mount option in the ()'s is rw (read-write) then you should be able to write to it. If it's ro (read-only) try this and see if it changes:



          sudo mount -o remount,rw /dev/sdb1 /media/simon/LYDIA


          If the filesystem (fs) has errors it may get mounted as ro, there should be messages about it in dmesg & /var/log/syslog too. This is what your logs show:



          [  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may  
          be corrupt. Please run fsck.
          [ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
          [ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only


          That includes a clue to how the fs could have gotten corrupted - "not properly unmounted", you should always unmount before unplugging anything. Most file managers have an "eject" to help with that.



          The dmesg log also say how to fix it: fsck can try to fix fs errors, it attempts to pick the right check program, or you can pick one explicitly with fsck.vfat or fsck.[other] pressing TAB after fsck. should list options.




          • For a FAT system (often have to run it twice, doesn't always fix all errors the first time)


            • fsck.vfat -vaV [device] should work automatically (-a) & display more info (-v) & do a "verification" pass (-V), or just:

            • fsck.vfat -a [device]




          NOTE: This will not guarantee that the filesystem will stay fixed, it could get corrupted again & it may be impossible to know exactly why. Always unmount / "eject" before removing USB drives.



          Note if a fs mounts as rw, but then errors are seen & it gets automatically remounted as ro, the mount command may still report it's mounted rw. Looking at this file with less /proc/mounts should usually show more reliable information (see man mount).





          If something is mounted rw but you still can't add/delete/edit files on it, you may not be the owner of the files. In some fs's you can chown to become the owner, but a FAT32 fs like on sdb1 doesn't have those permissions; they're set when it mounts with the mount option uid=value (value is your userid, learn it with echo $UID or id -u) then you can try this & see if it works afterwards:



          sudo mount -o remount,rw,uid=[userid] /dev/sdb1 /media/simon/LYDIA



          • Note: Sometimes, you may need to restart your gui file manager to get it to "notice" the mount change that lets you write to the filesystem/drive, but a terminal should always work.


          Or if the above doesn't work, try sudo su to "become" root, to see if anything can write to files on the USB (with touch, echo, etc)?






          share|improve this answer























          • Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
            – oodles2do
            Dec 20 '14 at 21:40










          • At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
            – Xen2050
            Dec 20 '14 at 21:47










          • How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
            – oodles2do
            Dec 20 '14 at 21:58










          • If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
            – Xen2050
            Dec 20 '14 at 22:30










          • Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
            – oodles2do
            Dec 21 '14 at 9:42
















          5














          When you ran mount only sda5 (your /) was mounted, and it was read-write (rw) so you should be able to write to it. Normally, most of the directories like /sys, /bin are only writeable by root (you'd need sudo first), but your home folder should be writeable to your regular user.



          Can you create any files in your home folder? Maybe your gui file manager is stuck thinking they're read-only, if you try in a terminal does it work? For example, do these commands work?:



          cd ~
          touch newfile001
          echo stuff >> newfile001
          cat newfile001


          If those work successfully then you can write to your HD (sda5).





          For the USB drive, after it's plugged in and mounted, look at mount to find it (the /dev/sdb1 ... line) and see if the mount option in the ()'s is rw (read-write) then you should be able to write to it. If it's ro (read-only) try this and see if it changes:



          sudo mount -o remount,rw /dev/sdb1 /media/simon/LYDIA


          If the filesystem (fs) has errors it may get mounted as ro, there should be messages about it in dmesg & /var/log/syslog too. This is what your logs show:



          [  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may  
          be corrupt. Please run fsck.
          [ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
          [ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only


          That includes a clue to how the fs could have gotten corrupted - "not properly unmounted", you should always unmount before unplugging anything. Most file managers have an "eject" to help with that.



          The dmesg log also say how to fix it: fsck can try to fix fs errors, it attempts to pick the right check program, or you can pick one explicitly with fsck.vfat or fsck.[other] pressing TAB after fsck. should list options.




          • For a FAT system (often have to run it twice, doesn't always fix all errors the first time)


            • fsck.vfat -vaV [device] should work automatically (-a) & display more info (-v) & do a "verification" pass (-V), or just:

            • fsck.vfat -a [device]




          NOTE: This will not guarantee that the filesystem will stay fixed, it could get corrupted again & it may be impossible to know exactly why. Always unmount / "eject" before removing USB drives.



          Note if a fs mounts as rw, but then errors are seen & it gets automatically remounted as ro, the mount command may still report it's mounted rw. Looking at this file with less /proc/mounts should usually show more reliable information (see man mount).





          If something is mounted rw but you still can't add/delete/edit files on it, you may not be the owner of the files. In some fs's you can chown to become the owner, but a FAT32 fs like on sdb1 doesn't have those permissions; they're set when it mounts with the mount option uid=value (value is your userid, learn it with echo $UID or id -u) then you can try this & see if it works afterwards:



          sudo mount -o remount,rw,uid=[userid] /dev/sdb1 /media/simon/LYDIA



          • Note: Sometimes, you may need to restart your gui file manager to get it to "notice" the mount change that lets you write to the filesystem/drive, but a terminal should always work.


          Or if the above doesn't work, try sudo su to "become" root, to see if anything can write to files on the USB (with touch, echo, etc)?






          share|improve this answer























          • Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
            – oodles2do
            Dec 20 '14 at 21:40










          • At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
            – Xen2050
            Dec 20 '14 at 21:47










          • How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
            – oodles2do
            Dec 20 '14 at 21:58










          • If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
            – Xen2050
            Dec 20 '14 at 22:30










          • Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
            – oodles2do
            Dec 21 '14 at 9:42














          5












          5








          5






          When you ran mount only sda5 (your /) was mounted, and it was read-write (rw) so you should be able to write to it. Normally, most of the directories like /sys, /bin are only writeable by root (you'd need sudo first), but your home folder should be writeable to your regular user.



          Can you create any files in your home folder? Maybe your gui file manager is stuck thinking they're read-only, if you try in a terminal does it work? For example, do these commands work?:



          cd ~
          touch newfile001
          echo stuff >> newfile001
          cat newfile001


          If those work successfully then you can write to your HD (sda5).





          For the USB drive, after it's plugged in and mounted, look at mount to find it (the /dev/sdb1 ... line) and see if the mount option in the ()'s is rw (read-write) then you should be able to write to it. If it's ro (read-only) try this and see if it changes:



          sudo mount -o remount,rw /dev/sdb1 /media/simon/LYDIA


          If the filesystem (fs) has errors it may get mounted as ro, there should be messages about it in dmesg & /var/log/syslog too. This is what your logs show:



          [  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may  
          be corrupt. Please run fsck.
          [ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
          [ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only


          That includes a clue to how the fs could have gotten corrupted - "not properly unmounted", you should always unmount before unplugging anything. Most file managers have an "eject" to help with that.



          The dmesg log also say how to fix it: fsck can try to fix fs errors, it attempts to pick the right check program, or you can pick one explicitly with fsck.vfat or fsck.[other] pressing TAB after fsck. should list options.




          • For a FAT system (often have to run it twice, doesn't always fix all errors the first time)


            • fsck.vfat -vaV [device] should work automatically (-a) & display more info (-v) & do a "verification" pass (-V), or just:

            • fsck.vfat -a [device]




          NOTE: This will not guarantee that the filesystem will stay fixed, it could get corrupted again & it may be impossible to know exactly why. Always unmount / "eject" before removing USB drives.



          Note if a fs mounts as rw, but then errors are seen & it gets automatically remounted as ro, the mount command may still report it's mounted rw. Looking at this file with less /proc/mounts should usually show more reliable information (see man mount).





          If something is mounted rw but you still can't add/delete/edit files on it, you may not be the owner of the files. In some fs's you can chown to become the owner, but a FAT32 fs like on sdb1 doesn't have those permissions; they're set when it mounts with the mount option uid=value (value is your userid, learn it with echo $UID or id -u) then you can try this & see if it works afterwards:



          sudo mount -o remount,rw,uid=[userid] /dev/sdb1 /media/simon/LYDIA



          • Note: Sometimes, you may need to restart your gui file manager to get it to "notice" the mount change that lets you write to the filesystem/drive, but a terminal should always work.


          Or if the above doesn't work, try sudo su to "become" root, to see if anything can write to files on the USB (with touch, echo, etc)?






          share|improve this answer














          When you ran mount only sda5 (your /) was mounted, and it was read-write (rw) so you should be able to write to it. Normally, most of the directories like /sys, /bin are only writeable by root (you'd need sudo first), but your home folder should be writeable to your regular user.



          Can you create any files in your home folder? Maybe your gui file manager is stuck thinking they're read-only, if you try in a terminal does it work? For example, do these commands work?:



          cd ~
          touch newfile001
          echo stuff >> newfile001
          cat newfile001


          If those work successfully then you can write to your HD (sda5).





          For the USB drive, after it's plugged in and mounted, look at mount to find it (the /dev/sdb1 ... line) and see if the mount option in the ()'s is rw (read-write) then you should be able to write to it. If it's ro (read-only) try this and see if it changes:



          sudo mount -o remount,rw /dev/sdb1 /media/simon/LYDIA


          If the filesystem (fs) has errors it may get mounted as ro, there should be messages about it in dmesg & /var/log/syslog too. This is what your logs show:



          [  159.366772] FAT-fs (sdb1): Volume was not properly unmounted. Some data may  
          be corrupt. Please run fsck.
          [ 159.383252] FAT-fs (sdb1): error, fat_get_cluster: invalid cluster chain (i_pos 0)
          [ 159.383258] FAT-fs (sdb1): Filesystem has been set read-only


          That includes a clue to how the fs could have gotten corrupted - "not properly unmounted", you should always unmount before unplugging anything. Most file managers have an "eject" to help with that.



          The dmesg log also say how to fix it: fsck can try to fix fs errors, it attempts to pick the right check program, or you can pick one explicitly with fsck.vfat or fsck.[other] pressing TAB after fsck. should list options.




          • For a FAT system (often have to run it twice, doesn't always fix all errors the first time)


            • fsck.vfat -vaV [device] should work automatically (-a) & display more info (-v) & do a "verification" pass (-V), or just:

            • fsck.vfat -a [device]




          NOTE: This will not guarantee that the filesystem will stay fixed, it could get corrupted again & it may be impossible to know exactly why. Always unmount / "eject" before removing USB drives.



          Note if a fs mounts as rw, but then errors are seen & it gets automatically remounted as ro, the mount command may still report it's mounted rw. Looking at this file with less /proc/mounts should usually show more reliable information (see man mount).





          If something is mounted rw but you still can't add/delete/edit files on it, you may not be the owner of the files. In some fs's you can chown to become the owner, but a FAT32 fs like on sdb1 doesn't have those permissions; they're set when it mounts with the mount option uid=value (value is your userid, learn it with echo $UID or id -u) then you can try this & see if it works afterwards:



          sudo mount -o remount,rw,uid=[userid] /dev/sdb1 /media/simon/LYDIA



          • Note: Sometimes, you may need to restart your gui file manager to get it to "notice" the mount change that lets you write to the filesystem/drive, but a terminal should always work.


          Or if the above doesn't work, try sudo su to "become" root, to see if anything can write to files on the USB (with touch, echo, etc)?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 21 '14 at 19:18

























          answered Dec 20 '14 at 21:19









          Xen2050Xen2050

          6,72212143




          6,72212143












          • Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
            – oodles2do
            Dec 20 '14 at 21:40










          • At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
            – Xen2050
            Dec 20 '14 at 21:47










          • How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
            – oodles2do
            Dec 20 '14 at 21:58










          • If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
            – Xen2050
            Dec 20 '14 at 22:30










          • Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
            – oodles2do
            Dec 21 '14 at 9:42


















          • Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
            – oodles2do
            Dec 20 '14 at 21:40










          • At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
            – Xen2050
            Dec 20 '14 at 21:47










          • How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
            – oodles2do
            Dec 20 '14 at 21:58










          • If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
            – Xen2050
            Dec 20 '14 at 22:30










          • Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
            – oodles2do
            Dec 21 '14 at 9:42
















          Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
          – oodles2do
          Dec 20 '14 at 21:40




          Thanks for your answer, I did the newfile001 commands and I got "stuff" as a response. Also, from the mount command there is rw in the bracket for the usb stick, so I should be able to read-write to it. I just tried the commands at the end of your answer but it hasn't worked, it's still a read-only device.
          – oodles2do
          Dec 20 '14 at 21:40












          At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
          – Xen2050
          Dec 20 '14 at 21:47




          At least the HD is working... USB should be writeable... if you cd into a USB folder, can you write any files with echo stuff >> newusbfile or similar? Or echo stuff | sudo tee newusbfile? Or first run sudo su to "become" root, then the echo, cat, etc?
          – Xen2050
          Dec 20 '14 at 21:47












          How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
          – oodles2do
          Dec 20 '14 at 21:58




          How do I do the cd commands into the USB folder? I think I just did it into /media/simon and it worked, but the USB is /media/simon/LYDIA
          – oodles2do
          Dec 20 '14 at 21:58












          If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
          – Xen2050
          Dec 20 '14 at 22:30




          If the USB isn't mounted, then the /media/simon/LYDIA is just an empty folder (if it's even there). After it's mounted you can see where it's mounted folder is with mount or lsblk, then cd mounted_folder and try writing files, mkdir, etc... and as sudo su to see if you can write as root too...
          – Xen2050
          Dec 20 '14 at 22:30












          Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
          – oodles2do
          Dec 21 '14 at 9:42




          Thanks for all your help, I just tried to write a file into the usb file but it didn't work, it says it's a read only file system. I've added the code to the question so you can see what I did.
          – oodles2do
          Dec 21 '14 at 9:42











          4














          Goto Disks.



          Select your USB drive.



          Click on Additional partition options and select Format Partition.



          Then select erase Overwrite existing data with zeroes(slow) and type FAT.



          I have tried many things after searching on internet but this worked for me.






          share|improve this answer

















          • 1




            This'll erase all data on the drive.
            – cst1992
            Jul 21 '17 at 21:30










          • What if I need NTFS? The same for NTFS did not work for me.
            – Vadim Kotov
            May 28 '18 at 12:19


















          4














          Goto Disks.



          Select your USB drive.



          Click on Additional partition options and select Format Partition.



          Then select erase Overwrite existing data with zeroes(slow) and type FAT.



          I have tried many things after searching on internet but this worked for me.






          share|improve this answer

















          • 1




            This'll erase all data on the drive.
            – cst1992
            Jul 21 '17 at 21:30










          • What if I need NTFS? The same for NTFS did not work for me.
            – Vadim Kotov
            May 28 '18 at 12:19
















          4












          4








          4






          Goto Disks.



          Select your USB drive.



          Click on Additional partition options and select Format Partition.



          Then select erase Overwrite existing data with zeroes(slow) and type FAT.



          I have tried many things after searching on internet but this worked for me.






          share|improve this answer












          Goto Disks.



          Select your USB drive.



          Click on Additional partition options and select Format Partition.



          Then select erase Overwrite existing data with zeroes(slow) and type FAT.



          I have tried many things after searching on internet but this worked for me.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 21 '17 at 21:46









          MahmudMahmud

          467




          467








          • 1




            This'll erase all data on the drive.
            – cst1992
            Jul 21 '17 at 21:30










          • What if I need NTFS? The same for NTFS did not work for me.
            – Vadim Kotov
            May 28 '18 at 12:19
















          • 1




            This'll erase all data on the drive.
            – cst1992
            Jul 21 '17 at 21:30










          • What if I need NTFS? The same for NTFS did not work for me.
            – Vadim Kotov
            May 28 '18 at 12:19










          1




          1




          This'll erase all data on the drive.
          – cst1992
          Jul 21 '17 at 21:30




          This'll erase all data on the drive.
          – cst1992
          Jul 21 '17 at 21:30












          What if I need NTFS? The same for NTFS did not work for me.
          – Vadim Kotov
          May 28 '18 at 12:19






          What if I need NTFS? The same for NTFS did not work for me.
          – Vadim Kotov
          May 28 '18 at 12:19













          0














          Quick fix methods:



          Method 1



          Sometimes we can accomplish the task from bash without trouble
          I usually do (no sudo required)



          mkdir /media/$USER/mydrive/myfolder
          cp -r src/ /media/$USER/mydrive/myfolder


          However, sometimes, when I need to use file browser,



          sudo nautilus /media/$USER/mydrive/


          Note: this is a quick fix, use it only if you get frustrated because no other answers above worked



          Method 2



          Reboot OS






          share|improve this answer




























            0














            Quick fix methods:



            Method 1



            Sometimes we can accomplish the task from bash without trouble
            I usually do (no sudo required)



            mkdir /media/$USER/mydrive/myfolder
            cp -r src/ /media/$USER/mydrive/myfolder


            However, sometimes, when I need to use file browser,



            sudo nautilus /media/$USER/mydrive/


            Note: this is a quick fix, use it only if you get frustrated because no other answers above worked



            Method 2



            Reboot OS






            share|improve this answer


























              0












              0








              0






              Quick fix methods:



              Method 1



              Sometimes we can accomplish the task from bash without trouble
              I usually do (no sudo required)



              mkdir /media/$USER/mydrive/myfolder
              cp -r src/ /media/$USER/mydrive/myfolder


              However, sometimes, when I need to use file browser,



              sudo nautilus /media/$USER/mydrive/


              Note: this is a quick fix, use it only if you get frustrated because no other answers above worked



              Method 2



              Reboot OS






              share|improve this answer














              Quick fix methods:



              Method 1



              Sometimes we can accomplish the task from bash without trouble
              I usually do (no sudo required)



              mkdir /media/$USER/mydrive/myfolder
              cp -r src/ /media/$USER/mydrive/myfolder


              However, sometimes, when I need to use file browser,



              sudo nautilus /media/$USER/mydrive/


              Note: this is a quick fix, use it only if you get frustrated because no other answers above worked



              Method 2



              Reboot OS







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 7 '17 at 15:33

























              answered Jun 7 '17 at 15:12









              Thamme GowdaThamme Gowda

              34125




              34125























                  0














                  As like in wayofthefuture's answer above when you're using Nemo (like me, if you use the Cinnamon desktop environment) try:



                  killall nemo





                  share|improve this answer




























                    0














                    As like in wayofthefuture's answer above when you're using Nemo (like me, if you use the Cinnamon desktop environment) try:



                    killall nemo





                    share|improve this answer


























                      0












                      0








                      0






                      As like in wayofthefuture's answer above when you're using Nemo (like me, if you use the Cinnamon desktop environment) try:



                      killall nemo





                      share|improve this answer














                      As like in wayofthefuture's answer above when you're using Nemo (like me, if you use the Cinnamon desktop environment) try:



                      killall nemo






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Dec 5 '17 at 22:01









                      Eliah Kagan

                      81.4k21227364




                      81.4k21227364










                      answered Dec 5 '17 at 21:08









                      Christian OpitzChristian Opitz

                      11




                      11























                          0














                          try below strategies





                          1. edit /etc/fuse.conf as superuser



                            change #user_allow_other to user_allow_other




                          2. enable write support for external devices





                            • sudo apt-get install ntfs-config

                            • sudo ntfs-config








                          share|improve this answer


























                            0














                            try below strategies





                            1. edit /etc/fuse.conf as superuser



                              change #user_allow_other to user_allow_other




                            2. enable write support for external devices





                              • sudo apt-get install ntfs-config

                              • sudo ntfs-config








                            share|improve this answer
























                              0












                              0








                              0






                              try below strategies





                              1. edit /etc/fuse.conf as superuser



                                change #user_allow_other to user_allow_other




                              2. enable write support for external devices





                                • sudo apt-get install ntfs-config

                                • sudo ntfs-config








                              share|improve this answer












                              try below strategies





                              1. edit /etc/fuse.conf as superuser



                                change #user_allow_other to user_allow_other




                              2. enable write support for external devices





                                • sudo apt-get install ntfs-config

                                • sudo ntfs-config









                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 26 '18 at 18:03









                              OshanzOshanz

                              1062




                              1062























                                  0














                                  This is because your file system is NTFS and it is in an unsafe stat, maybe you are using your disk in windows, one of the reasons is that you hibernated the windows or fast restarted it., so use one of these steps:





                                  1. unmount the media using the below command, go to windows (maybe Dual boot mode or maybe in an another computer) and shut down the windows completely, not hibernate or fast restart,



                                    sudo umount /media/"your media label"




                                  then come to Linux again and mount your media using this command:



                                  'sudo mount -o rw,mount /your media'




                                  1. if you are using macOs , plug your media to your mac device and use this command:



                                    'sudo /usr/sbin/diskutil disableJournal /Volumes/name-of-media'








                                  share|improve this answer


























                                    0














                                    This is because your file system is NTFS and it is in an unsafe stat, maybe you are using your disk in windows, one of the reasons is that you hibernated the windows or fast restarted it., so use one of these steps:





                                    1. unmount the media using the below command, go to windows (maybe Dual boot mode or maybe in an another computer) and shut down the windows completely, not hibernate or fast restart,



                                      sudo umount /media/"your media label"




                                    then come to Linux again and mount your media using this command:



                                    'sudo mount -o rw,mount /your media'




                                    1. if you are using macOs , plug your media to your mac device and use this command:



                                      'sudo /usr/sbin/diskutil disableJournal /Volumes/name-of-media'








                                    share|improve this answer
























                                      0












                                      0








                                      0






                                      This is because your file system is NTFS and it is in an unsafe stat, maybe you are using your disk in windows, one of the reasons is that you hibernated the windows or fast restarted it., so use one of these steps:





                                      1. unmount the media using the below command, go to windows (maybe Dual boot mode or maybe in an another computer) and shut down the windows completely, not hibernate or fast restart,



                                        sudo umount /media/"your media label"




                                      then come to Linux again and mount your media using this command:



                                      'sudo mount -o rw,mount /your media'




                                      1. if you are using macOs , plug your media to your mac device and use this command:



                                        'sudo /usr/sbin/diskutil disableJournal /Volumes/name-of-media'








                                      share|improve this answer












                                      This is because your file system is NTFS and it is in an unsafe stat, maybe you are using your disk in windows, one of the reasons is that you hibernated the windows or fast restarted it., so use one of these steps:





                                      1. unmount the media using the below command, go to windows (maybe Dual boot mode or maybe in an another computer) and shut down the windows completely, not hibernate or fast restart,



                                        sudo umount /media/"your media label"




                                      then come to Linux again and mount your media using this command:



                                      'sudo mount -o rw,mount /your media'




                                      1. if you are using macOs , plug your media to your mac device and use this command:



                                        'sudo /usr/sbin/diskutil disableJournal /Volumes/name-of-media'









                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jan 3 at 19:39









                                      Nima GhoroubiNima Ghoroubi

                                      11




                                      11






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Ask Ubuntu!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.





                                          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                          Please pay close attention to the following guidance:


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f563764%2fusb-devices-showing-as-read-only%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Category:香港粉麵

                                          List *all* the tuples!

                                          Channel [V]