Formatting a usb pen in fat32 using mkdosfs

Status
Not open for further replies.

NucleusKore

TheSaint
Joined
Jun 19, 2004
Messages
3,423
After unmounting the pendrive, and using fdisk to set the partition as W95 FAT32, I used the following command

sudo mkdosfs -F 32 /dev/sdb1

Now everything was successful, but when I try to paste files as user I cannot because the owner of the filesystem is root (I had to be root to fdisk and mkdosfs).

So how do I solve this problem?
 

Flake

Linux User
Joined
Jan 8, 2008
Messages
356
Re-Mount stick and set umask value to zero. Let say, /media/sdb1 is mount point ( folder ). In case it doesn't exist, create it.
Code:
sudo umount /dev/sdb1
sudo mount -vfat /dev/sdb1 /media/sdb1 -o defaults,umask=0
Regular user will have full privileges.
 
OP
NucleusKore

NucleusKore

TheSaint
Joined
Jun 19, 2004
Messages
3,423
Thank you for your reply, will await other replies too. This is a manual method. I am ok with it, but not if I teach newcomers.

Please have a look at this thread also
*ubuntuforums.org/showthread.php?t=1022712
 
Last edited:

Flake

Linux User
Joined
Jan 8, 2008
Messages
356
Easiest but a risky way is, press Alt+F2 and type this
Code:
gksu nautilus
It will open Nautilus with root privileges. You will have full access to every file/folder. Risky, because you will root user and it not good to have root privileges in GUI.
 

vinayasurya

Journeyman
Joined
Jun 12, 2005
Messages
127
I usually use mkfs.vfat to format usb on linux. Is this different from the method discussed here ?
 

blondie

Broken In
Joined
Dec 29, 2008
Messages
28
Try adding the user to group haldaemon, since the mounting and things are controlled by hal.
 

Flake

Linux User
Joined
Jan 8, 2008
Messages
356
vinayasurya said:
I usually use mkfs.vfat to format usb on linux. Is this different from the method discussed here ?
mkfs.vfat and mkdosfs -F 32 do the same job. Both commands format partition in FAT32 filesystem in similar way.
 
Status
Not open for further replies.
Top