Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am really new to ubuntu (12.04) to automount my drive I added this line to fstab

/dev/sda4 /media/FF15-ED92 vfat defaults 0 0

But now when I want to delete a directory or a file it doesn't delete like using del key of keyboard so right clicked on that directories and files but there was no option to delete and move to trash was also not clickable. So how can I give myself permissions to do this. Also I can't do this on my pen drive also.

I tried this but nothing happened

sudo chmod 777 /media/44gb

if I change from chmod to chown then it gives that

changing ownership of /media/44gb: Operation not permitted

share|improve this question

You need to not only set the owner and permissions on the directory where you mount the drive, but you also need to set mounting options in fstab.

I use the preferred method of UUIDs rather than your older method of /dev/sda. If you want to use this, it tells you how at the top of fstab, but at a terminal, you enter the command sudo blkid to get a list of UUIDs, which you can then cut and paste into fstab.

My NTFS drive is set with these options; I am the owner:

#sdax good idea to add comment here
UUID=C61460BE1460B2DB  /mnt/foldername  ntfs-3g auto,users,uid=yourID,gid=yourID,utf8,dmask=002,fmask=113  0  0

I mount it in /mnt/foldername, and yourID should be changed to your login name. This should get you started, but if it isn't quite right, you can either learn more by searching, or by asking here.

I don't actually have any FAT/FAT32/VFAT partition, but I think they may be the same, except for the ntfs-3g part.

the /media directory is traditionally used for auto-mounted media, I think, but I suppose it's OK. I use /mnt.

Edit - testing mount options

One easy method for testing and debugging the options in /etc/fstab is to use a special mount command that will mount all the usual mounts in fstab interactively, rather than at boot time.

My method is to keep open the file /etc/fstab, but save any edits; then, at a command prompt, I enter sudo mount -a to mount everything in fstab, and it will output an error message if there are any problems. If there are no problems, I test to see if the results are what I want. If not, I unmount that directory only, using sudo umount /path/mountname, make another edit to fstab, save, and repeat until it's working.

If there is a syntax error, then before closing the file, I usually comment out the entry if I can't get it fixed, and try again later.

share|improve this answer
thanks guys for your help but i converted it from vfat to ntfs – Gitesh Oct 11 '12 at 17:03
Good idea. ntfs is more robust than vfat. – Marty Fried Oct 11 '12 at 17:04
yeah it is now working good but i will really try uid and gid thing actually i firstly tried UUID one only but there was some problem in that command and it was not getting mounted on startup. I was in a hurry so i used dev/sda method – Gitesh Oct 11 '12 at 17:10
I added an Edit to my answer with a testing/debugging tip you might find helpful while working this out. – Marty Fried Oct 11 '12 at 17:25
I found my mistake. I was using ntfs instead of ntfs-3g as for ntfs linux gives read only permission. – Gitesh Oct 12 '12 at 17:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.