You are not logged in.

#1 2011-01-25 10:58:19

rp101
Member
Registered: 2010-07-08
Posts: 15

mount fat32 usb stick

I have usb stick with fat32. I am trying to mount it for read and write. But it mounts as read only.
I tried few commands:
sudo mount -o rw,noauto,async,user,umask=1000 /dev/sdb1 /mnt/usbstick (this command from archlinux wiki page)
sudo mount -t vfat -o rw,noauto,async,user,umask=1000 /dev/sdb1 /mnt/usbstick
sudo mount -t vfat /dev/sdb1 /mnt/usbstick

Offline

#2 2011-01-25 12:33:45

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: mount fat32 usb stick

Try mounting after checking the filesystem on the drive


Be yourself, because you are all that you can be

Offline

#3 2011-01-25 14:29:03

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

ScriptDevil wrote:

Try mounting after checking the filesystem on the drive

Sorry I do not understand what do you mean.

Offline

#4 2011-01-25 15:02:19

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

sudo fdisk -l

With drive plugged in

Last edited by Mr Green (2011-01-25 15:03:05)


Mr Green

Offline

#5 2011-01-25 15:17:01

adee
Member
From: The Moon
Registered: 2009-11-10
Posts: 110

Re: mount fat32 usb stick

man fsck.vfat

Offline

#6 2011-01-25 15:25:04

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

Mr Green wrote:
sudo fdisk -l

With drive plugged in

Yes of course it finds /dev/sdb1

sudo fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            8064    31293439    15642688    c  W95 FAT32 (LBA)

And I am able to mount it. But I can only read it.

By the way if I do:

cd /mnt/usbstick/
ls -l
total 256
drwxr-xr-x 11 root root 32768 Jan 18 16:21 documents
drwxr-xr-x 27 root root 32768 Dec 14 09:01 music
drwxr-xr-x 11 root root 32768 Jan 12 09:01 pictures
drwxr-xr-x  2 root root 32768 Jan 14 11:40 skype
drwxr-xr-x  3 root root 32768 Jan 23 17:52 video

The owner of the files is root. I tried to change owner with sudo chown... but I get message that I do not have permission.

Offline

#7 2011-01-25 15:32:01

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

Ok can you write a file to the stick as root?


Mr Green

Offline

#8 2011-01-25 15:35:34

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

Mr Green wrote:

Ok can you write a file to the stick as root?

Yes. If I login as root I can write.

Offline

#9 2011-01-25 15:42:35

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

Ok one last thing to try, umount and remount somewhere you have access too like your home directory

create a folder usbdrive and then mount to that see if it makes any difference

Would suggest using pmount or udisk to make it easier to mount at cli, that is up to you

Another thing check you are a member of the correct groups for your user


Mr Green

Offline

#10 2011-01-25 15:43:53

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: mount fat32 usb stick

sudo chown -R rp101:users /mnt/usbstick 

doesn't work??


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#11 2011-01-25 15:45:32

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

Of course it will work, but without the command he used no one will ever know the why!


Mr Green

Offline

#12 2011-01-25 15:48:58

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: mount fat32 usb stick

Mr Green wrote:

Of course it will work, but without the command he used no one will ever know the why!

ok, you lost me there smile


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2011-01-25 15:56:26

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

Inxsible wrote:
sudo chown -R rp101:users /mnt/usbstick 

doesn't work??

This does not work. I get "Operation not permitted" for every file.

Offline

#14 2011-01-25 16:00:35

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

Mr Green wrote:

Ok one last thing to try, umount and remount somewhere you have access too like your home directory

create a folder usbdrive and then mount to that see if it makes any difference

Would suggest using pmount or udisk to make it easier to mount at cli, that is up to you

Another thing check you are a member of the correct groups for your user

This also does not work.
I created usbdrive in my home directory. And I still have the same situation.

What about the user group? How to see what permissions my user group has?

Offline

#15 2011-01-25 16:05:24

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

rp101 wrote:
Mr Green wrote:

Ok one last thing to try, umount and remount somewhere you have access too like your home directory

create a folder usbdrive and then mount to that see if it makes any difference

Would suggest using pmount or udisk to make it easier to mount at cli, that is up to you

Another thing check you are a member of the correct groups for your user

This also does not work.
I created usbdrive in my home directory. And I still have the same situation.

What about the user group? How to see what permissions my user group has?

I've made:

less /etc/group

root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin
adm:x:4:root,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,rolandas
mem:x:8:
kmem:x:9:
wheel:x:10:root,rolandas
ftp:x:11:
mail:x:12:
uucp:x:14:
log:x:19:root
locate:x:21:
rfkill:x:24:
smmsp:x:25:
http:x:33:
games:x:50:rolandas
network:x:90:
video:x:91:rolandas
audio:x:92:rolandas
optical:x:93:rolandas,hal
floppy:x:94:hal
storage:x:95:rolandas,hal
scanner:x:96:
power:x:98:rolandas
nobody:x:99:
users:x:100:
dbus:x:81:
avahi:x:84:
hal:x:82:
vboxusers:x:108:rolandas
lxdm:x:121:

Offline

#16 2011-01-25 16:23:05

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: mount fat32 usb stick

groups

will show you all the groups your user belongs to. Make sure you run it as your username and NOT as root though.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#17 2011-01-25 16:25:36

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

a simple

groups

will tell you what your user is a member of ....

honestly stumped as to why it does not work

ls -l usbdrive

in your home directory

EDIT beat me to it

Last edited by Mr Green (2011-01-25 16:26:03)


Mr Green

Offline

#18 2011-01-25 16:28:12

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: mount fat32 usb stick

Have you tried running the command I gave you earlier as root??

# chown -R rp101:users /mnt/usbstick

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#19 2011-01-25 16:50:53

Korrode
Member
From: Australia
Registered: 2009-11-02
Posts: 110

Re: mount fat32 usb stick

Personally, I use pmount to mount removal USB storage devices as my user account (not root), thus avoiding the kind of permission issues you're having.

sudo pacman -S pmount
pmount /dev/sdb1

(pmount will create a directory called "sdb1" in /mnt)


xfce | compiz | gmrun | urxvt | chromium | geany | aqualung | vlc | geeqie

Offline

#20 2011-01-25 16:59:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: mount fat32 usb stick

see post #9


Mr Green

Offline

#21 2011-01-25 17:36:57

rp101
Member
Registered: 2010-07-08
Posts: 15

Re: mount fat32 usb stick

I found one way to solve the problem permission.
I added one line to /etc/fstab

/dev/sdb1      /mnt/usb      auto    noauto,user,rw,exec 0 0

And then

mount /dev/sdb1

pmount also works fine.
After

pmount /dev/sdb1

it created /media/sdb1 which I can access with rw permission.

Offline

Board footer

Powered by FluxBB