I've got an ext3 filesystem sitting in a file, and I'd like to mount it to a local directory without sudo or any elevated permissions. Why? I'm creating a small filesystem for automated testing purposes. The automated tests run on machines I do not control, so there are some barriers to adding mount to sudoers.
Here's how I created the filesystem:
$ dd if=/dev/zero of=./50MB_partition count=102400 $ mkfs.ext3 -F 50MB_partition
Had I had permission, I could now mount it like so:
$ mkdir small_partition $ sudo mount 50MB_partition ./small_partition
It seems that, because I own the filesystem and the mount point, there is no security risk associated with allowing me to mount this. I understand what is limiting me from calling mount without sudo; no explanation needed there. What I want to know is, is there a workaround that allows me to use my filesystem for testing purposes?