LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-27-2011, 05:18 PM   #1
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 540

Rep: Reputation: 30
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.
 
Old 04-27-2011, 06:39 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Quote:
Originally Posted by xmrkite View Post
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
 
1 members found this post helpful.
Old 04-27-2011, 08:18 PM   #3
Telengard
Member
 
Registered: Apr 2007
Location: USA
Distribution: Kubuntu 8.04
Posts: 579
Blog Entries: 8

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by andrewthomas View Post
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.
 
Old 04-28-2011, 12:55 AM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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.
 
Old 04-28-2011, 01:19 AM   #5
mecelec415
Member
 
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183
Blog Entries: 2

Rep: Reputation: 23
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
 
Old 04-28-2011, 01:25 AM   #6
rayfward
Member
 
Registered: May 2009
Location: Leeds Uk
Distribution: Linux Ubuntu
Posts: 87

Rep: Reputation: 4
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
 
Old 04-28-2011, 01:25 AM   #7
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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.
 
Old 04-28-2011, 05:02 AM   #8
omgs
Member
 
Registered: Dec 2010
Posts: 64

Rep: Reputation: 6
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.
 
Old 04-28-2011, 12:49 PM   #9
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 540

Original Poster
Rep: Reputation: 30
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.
 
  


Reply

Tags
filesystem, permission


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] can't write on my WD usb drive aihaike Slackware 1 01-13-2010 08:23 PM
Write to USB Drive from Linux then Reading from MS Windows KirkCuth Linux - Newbie 5 05-21-2006 04:50 PM
Windows frustrations and Linux praise (venting my frustrations) Shaun32 General 6 03-04-2005 12:07 PM
Linux/windows frustrations/ how do I write zeros aeiou Linux - General 5 09-04-2004 09:08 PM


All times are GMT -5. The time now is 08:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration