Can't write to USB on 11.04

Asked by Baharmuratoglu

Hi,
I can't write to USB stick on Natty. I can read and copy files to my netbook, but I can't delete or write. Simply I can't change anything.
Anyone has a suggestion?
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
Sam_ (and-sam) said :
#1

Make sure the mount point exists and user has full access.
All in a terminal: ctrl+alt+t
Example.
sudo chown user:group -R /media/<name_of_mountpoint>

## Where 'user' and 'group' is usually similar, lets say user name is bob, it would 'bob:bob'.

Reference.
https://help.ubuntu.com/community/FilePermissions
https://help.ubuntu.com/community/Fstab
https://help.ubuntu.com/community/Mount
https://help.ubuntu.com/community/DrivesAndPartitions

Revision history for this message
Baharmuratoglu (baharmuratoglu) said :
#2

I get this output

bash: syntax error near unexpected token `newline'

Revision history for this message
Baharmuratoglu (baharmuratoglu) said :
#3

Now I more or less understand what the problem is but I am not sure how to solve it. When I try to change user without connecting the USB by the command:
sudo chown bahar:bahar -R /media/usb0
Everything seems fine, but the problem is, when I connect the USB to the netbook, the owner changes again to "root".
When try changing the owner with the USB stick connected, it says "operation not permitted"

Revision history for this message
Sam_ (and-sam) said :
#4

> it says "operation not permitted"

First mount the drive then change owner of mountpoint. (Note reference link of mount)

After attaching usb please provide output of:
sudo fdisk -l
mount

Revision history for this message
Baharmuratoglu (baharmuratoglu) said :
#5

This is the output when I try to change the owner after attaching the USB with the command: sudo chown bahar:bahar -R /media/usb0

chown: changing ownership of `/media/usb0/B\334LENT ORTA\307G?L/BULENT ORTACGiL\'E SAYGI - Sarkilar Bir Oyundur/Sarkilar Bir Oyundur CD1/Ferudun Duzagac - Sevgi.MP3': Operation not permitted
chown: changing ownership of `/media/usb0/B\334LENT ORTA\307G?L/BULENT ORTACGiL\'E SAYGI - Sarkilar Bir Oyundur/Sarkilar Bir Oyundur CD1/Gurol Agirbas - Gunaydin.MP3': Operation not permitted

These are the other outputs:

bahar@bahar:~$ sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e72e5

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 29637 238053376 83 Linux
/dev/sda2 29637 30402 6142977 5 Extended
/dev/sda5 29637 30402 6142976 82 Linux swap / Solaris

Disk /dev/sdb: 4009 MB, 4009754624 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002f43e

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 487 3911796 c W95 FAT32 (LBA)

bahar@bahar:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=600)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/bahar/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=bahar)
/dev/sdb1 on /media/usb0 type vfat (rw,noexec,nodev,sync,noatime,nodiratime)

Thanks...

Revision history for this message
Best Sam_ (and-sam) said :
#6

Scroll to 'Mount the Drive'.
Try the one-liner where only 'external' needs to be replaced with 'usb0'.
https://help.ubuntu.com/community/Mount/USB#Using%20mount

Although there is still an open Bug #573981

Revision history for this message
Baharmuratoglu (baharmuratoglu) said :
#7

Thanks Sam_, that solved my question.

Revision history for this message
Baharmuratoglu (baharmuratoglu) said :
#8

Thanks!
I have read the bug and the solution worked for me too. I removed the usbmount from synaptic and after a reboot, the problem was solved.
Thank you very much.