Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 have been able to mount a ext2 image without having root access by adding an entry to /etc/fstab. However, I am not able to modify this image (copy a new file to it) without having sudo permissions. Is there a way to achieve this without having sudo permissions?

share|improve this question
Are you looking for chown/chmod? If the permissions of the (mounted) filesystem are set accordingly for that user, you should be able to create new files in it. – frostschutz Jul 8 '13 at 21:23
write now the permissions are at -rwxrwxr-x 1 aarunkum aarunkum. What should I change it to so that I don't need sudo access to write to this image? – akhil28288 Jul 8 '13 at 21:33
Is your user "aarunkum"? – Evan Teitelman Jul 8 '13 at 22:33
Have a look at cat /proc/mounts. Is the volume mounted read-only? – Hauke Laging Jul 9 '13 at 2:31
You were able to edit /etc/fstab without root access? Wow, that's a barn door sized security hole if I ever heard of one. – Michael Kjörling Jul 9 '13 at 19:45

user option in fstab

I think you just need to add the option user to your /etc/fstab entry if you want users to be able to mount the entry. For example:

/dev/cdrom  /cd  iso9660  ro,user,noauto,unhide


Also I think you can achieve what you want using the app pmount.

excerpt from man page

pmount - mount arbitrary hotpluggable devices as normal user

To mount:

$ pmount /dev/sda1 /media/somedir


share|improve this answer

I figured out that this was not related to the permissions of the image file actually. It was related to the permissions within the image file. The file system permissions were set only for root. I mounted the image file and did a chown on all the directories within the diskimage making myself the owner. After that I am able to write to it without root permissions. It makes sense to have the permissions to the image file set to root, as that way the image file becomes portable.

share|improve this answer

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.