Showing posts with label permission. Show all posts
Showing posts with label permission. Show all posts

Permission problems for FAT filesystems (Ubuntu)


Here is quick post about resolving problems with mounting FAT32 paritions on Ubuntu.

There are several ways to mount a partition, for example:
1. Manual by clicking on the device from the UI ('Places').
2. Configure FSTAB to do the job for you automatically.
3. Use GUI tools such as pysdm.
4. Manual from command line.

There might be a problem with permissions of writing or even accessing mounted fat partition. You can get message that you do not have permission to see the disk content or something similar.

Basically partition type of the fat file system is called VFAT in Unix based system. By default when you mount it the ownership of the place belongs to the root user. So you have to be a root to write files to the partition. Even more - you may also not be allowed to change ownership.

So to resolve this problems you can create an entry in /etc/fstab containing some special "settings" which will mount the partition for you with all required rights:

# device mount_point  type properties X Y
/dev/sda1 /media/directory  vfat umask=0000,rw,user 0 0

The key elements are the flags:
  • rw - mount as read and write (but it is not enough for fat devices)
  • user - permits any user to mount the filesystem
  • umask - gives actual permissions or rather resets it - this actually seems to resolve an issue with lack of permission for user due to root ownership
This topic, setting and flags could be discussed in more details but umask=0000 should do the trick.