LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't write to my usb drive, the frustrations of linux have found me again (https://www.linuxquestions.org/questions/linux-software-2/can%27t-write-to-my-usb-drive-the-frustrations-of-linux-have-found-me-again-877475/)

xmrkite 04-27-2011 05:18 PM

Can't write to my usb drive, the frustrations of linux have found me again
 
Hello, I can't save a file to my usb drive unless i use sudo.

I have a 160GB iOmega fat32 drive that automounts with this entry in fstab:

/dev/sdb1 /media/160GB vfat auto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8 0 0

I have tried running sudo chmod -R 777 /media/160GB/

It seems to complete, but i still can't save. I am using the default user ubuntu creates as this is a fresh install.

I am willing to try to figure it out, but most people would have given up on this a long time ago. Please help me with this.

andrewthomas 04-27-2011 06:39 PM

Quote:

Originally Posted by xmrkite (Post 4338532)
Hello, I can't save a file to my usb drive unless i use sudo.

I have a 160GB iOmega fat32 drive that automounts with this entry in fstab:

/dev/sdb1 /media/160GB vfat auto,users,uid=1000,gid=100,dmask=027,fmask=137,utf8 0 0

I have tried running sudo chmod -R 777 /media/160GB/

It seems to complete, but i still can't save. I am using the default user ubuntu creates as this is a fresh install.

I am willing to try to figure it out, but most people would have given up on this a long time ago. Please help me with this.

Try changing the fmask and dmask
Code:

/dev/sdb1      /media/160GB    vfat  auto,user,fmask=0111,dmask=0000  0  0

Telengard 04-27-2011 08:18 PM

Quote:

Originally Posted by andrewthomas (Post 4338584)
Try changing the fmask and dmask
Code:

/dev/sdb1      /media/160GB    vfat  auto,user,fmask=0111,dmask=0000  0  0

Formatting the volume with a Linux-native file system might be an alternative solution. I format my external USB drives with EXT3 to avoid hassles. I don't know if that would be a good option for you or not.

eantoranz 04-28-2011 12:55 AM

what's the output of this?

Code:

ls -ld /media/160GB
And I think the masks you are setting would be the cause of the problem.

mecelec415 04-28-2011 01:19 AM

would chown work?
chown it to you own it and its on a group ypu can write to?
as in
sudo chown youruser:yourgroup /media/160GB

rayfward 04-28-2011 01:25 AM

From your post I'm assuming you put an entry in fstab. Comment out the entry and let your desktop do the mounting.
Entries in fstab override desktop auto mounts. Fat has no security so it's not the format of the volume. The other thing I might suggest is to chown the mount point 'chown myname:myname /media/myvolume' or something on those lines.

Regards

eantoranz 04-28-2011 01:25 AM

I don't think it would work. If it's a fat/ntfs mount, permissions that apply are the ones set on mount.... if he were using native partitions (ext3 and so on) chown would do the trick.

omgs 04-28-2011 05:02 AM

Did you try adding "rw" to the mount options? Show the output of mount relative to your drive.

Apart, as you've been suggested, if you comment the entry in fstab, nautilus should mount automatically the device when you plug it in. Give it a try.

xmrkite 04-28-2011 12:49 PM

OK,

The command: ls -ld /media/160GB

Got me:
drwxr-xr-x 23 root root 32768 1969-12-31 16:00 /media/160GB


Quote:

From your post I'm assuming you put an entry in fstab. Comment out the entry and let your desktop do the mounting.
Entries in fstab override desktop auto mounts. Fat has no security so it's not the format of the volume. The other thing I might suggest is to chown the mount point 'chown myname:myname /media/myvolume' or something on those lines.
Trying this using sude gave me:
chown: changing ownership of `/media/160GB': Operation not permitted

I'm hoping to have kubuntu automount and am using kubuntu 10.10 to be exact. This drive is always plugged in.

What fixed it was changing the fstab entry to:

/dev/sdb1 /media/160GB vfat auto,user,fmask=0111,dmask=0000 0 0


Thanks for all the help.


All times are GMT -5. The time now is 10:36 AM.