USB Memory stick is read-only

Asked by Bob Murrell

I have the similar problem.
After formating usb disk in terminal (had to format it because it showed it's full but was empty, that problem seems solved now) and restarting pc, when I try to write on it I get:

''Destination is read only.'',
no matter is the write protection switched on or of.

When wiewing the hidden files, folder ''.trash-1000'' is shown, containing two empty folders, named ''files'' and ''info''.
When I right-click on it, ''Move to Trash'' option is enabled.

Any help? What to do with this trash folder and how to fix the read-only problem?
And please write detailed command lines for terminal if necessary, I'm really new to Ubuntu.

Thanks,
Jelena

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bob Murrell
Solved:
Last query:
Last reply:
Revision history for this message
Bob Murrell (bmurrell) said :
#1

When I try to delete a file, I get:Cannot move file to trash, do you want to delete immediately? and whit I click "DELETE", I Get:"/media/USB...120001.JPG" cannot be deleted because it is on a read-only disk.

I can read but not write, even though directories show as not locked

Revision history for this message
Benoit Malet (benoit-malet) said :
#2

Hello !

Can you please give us the results of the following commands ?

sudo fdisk -l
cat /etc/fstab
ls -l /media*

Regards,
Benoît

Revision history for this message
Bob Murrell (bmurrell) said :
#3

bobbilob@bobbilob-desktop:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 19364 155541298+ 83 Linux
/dev/sda2 19365 19457 747022+ 5 Extended
/dev/sda5 19365 19457 746991 82 Linux swap / Solaris

Disk /dev/sdb: 4060 MB, 4060086272 bytes
229 heads, 32 sectors/track, 1082 cylinders
Units = cylinders of 7328 * 512 = 3751936 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1083 3964912 c W95 FAT32 (LBA)
bobbilob@bobbilob-desktop:~$

bobbilob@bobbilob-desktop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=6b4bdc07-abd5-401f-bd44-245b8c7a043e / ext3
defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=50eb9f15-acb5-4d73-bb3e-b25be4053a02 none swap
sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
bobbilob@bobbilob-desktop:~$

bobbilob@bobbilob-desktop:~$ ls -l /media*
total 40
lrwxrwxrwx 1 root root 6 2007-05-03 09:52 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2007-05-03 09:52 cdrom0
lrwxrwxrwx 1 root root 7 2007-05-03 09:52 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2007-05-03 09:52 floppy0
drwx------ 12 bobbilob root 32768 1969-12-31 19:00 USB DISK
bobbilob@bobbilob-desktop:~$

On 5/23/07, Benoit Malet <email address hidden> wrote:
>
> Your question #7067 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/7067
>
> Status: Open => Needs information
>
> Benoit Malet requested for more information:
> Hello !
>
> Can you please give us the results of the following commands ?
>
> sudo fdisk -l
> cat /etc/fstab
> ls -l /media*
>
> Regards,
> Benoît
>
> _______________________________________________________________________
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/7067
>

Revision history for this message
Marc Fournier (mfournier) said :
#4

Permissions seem fine. Can you send us the output of the following commands just after plugging the USB key :

dmesg | tail
mount

And please try (as bobbilob user):

touch /media/USB\ DISK/test
rm /media/USB\ DISK/test

Thanks,
Marc

Revision history for this message
Bob Murrell (bmurrell) said :
#5

Hi Marc:
I hope this helps, does it look like the stick should be reformatted in
windows??

bobbilob@bobbilob-desktop:~$ dmesg | tail
[ 67.823116] eth0: no IPv6 routers present
[19137.133460] usb 5-2: new high speed USB device using ehci_hcd and address
2
[19137.271484] usb 5-2: configuration #1 chosen from 1 choice
[19137.776049] usbcore: registered new interface driver libusual
[19137.972933] Initializing USB Mass Storage driver...
[19137.977025] scsi2 : SCSI emulation for USB Mass Storage devices
[19138.031371] usbcore: registered new interface driver usb-storage
[19138.031386] USB Mass Storage support registered.
[19138.032275] usb-storage: device found at 2
[19138.032283] usb-storage: waiting for device to settle before scanning
bobbilob@bobbilob-desktop:~$ mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-15-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb1 on /media/USB DISK type vfat
(rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077)
bobbilob@bobbilob-desktop:~$

touch: cannot touch `/media/USB DISK/test': Read-only file system
bobbilob@bobbilob-desktop:~$ rm /media/USB\ DISK/test
rm: cannot remove `/media/USB DISK/test': No such file or directory
bobbilob@bobbilob-desktop:~$

On 5/23/07, Marc Fournier <email address hidden> wrote:
>
> Your question #7067 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/7067
>
> Status: Open => Needs information
>
> Marc Fournier requested for more information:
> Permissions seem fine. Can you send us the output of the following
> commands just after plugging the USB key :
>
> dmesg | tail
> mount
>
> And please try (as bobbilob user):
>
> touch /media/USB\ DISK/test
> rm /media/USB\ DISK/test
>
> Thanks,
> Marc
>
> _______________________________________________________________________
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/7067
>

Revision history for this message
Benoit Malet (benoit-malet) said :
#6

Hello !

Can you please post the result of the command 'id' ?

Regards,
Benoît

Revision history for this message
Bob Murrell (bmurrell) said :
#7

Here it is:

bobbilob@bobbilob-desktop:~$ id
uid=1000(bobbilob) gid=1000(bobbilob)
groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),104(scanner),112(netdev),113(lpadmin),115(powerdev),117(admin),1000(bobbilob)
bobbilob@bobbilob-desktop:~$

On 5/24/07, Benoit Malet <email address hidden> wrote:
>
> Your question #7067 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/7067
>
> Status: Open => Needs information
>
> Benoit Malet requested for more information:
> Hello !
>
> Can you please post the result of the command 'id' ?
>
> Regards,
> Benoît
>
> _______________________________________________________________________
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/7067
>

Revision history for this message
Best Bob Murrell (bmurrell) said :
#8

Hi Everyone:

I reformatted the memory stick in XP as FAT32 and now it is working in both Ububtu and XP as I had wanted. Must have been garbage on the disk before now. Sorry to have troubled you on this.

Bob