Formatting a usb pen in fat32 using mkdosfs

Status
Not open for further replies.

NucleusKore

TheSaint
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
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
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
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.
 

Flake

Linux User
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 Bottom