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?
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
excerpt from man page
pmount - mount arbitrary hotpluggable devices as normal user
$ pmount /dev/sda1 /media/somedir
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.