Hi,
I am unable to mount a hard disk image via the loop device as user; however, I am able to mount the image as root. It would make my life significantly simpler to be able to mount and unmount this image as a standard user.
i can mount the image as root with:
Code:
$ lsmod | grep loop
loop 16424 0
$mkdir /home/account/mnt
$ su -c "mount -o loop=/dev/loop0 /home/account/test.img /home/account/mnt"
$ su -c "ls /home/account/mnt"
test1 test2
$ su -c "umount /home/account/mnt"
now if i attempt to perform the same operations as user, i get errors:
Code:
$ mount -o loop=/dev/loop0 /home/account/test.img /home/account/mnt
/dev/loop1: Permission denied
i figured there may be an issue with permissions:
Code:
$ ls -l /dev/loop0
brw-rw---- 1 root disk 7, 1 2005-05-03 11:24 /dev/loop0
$ chmod 666 /dev/loop0
$ ls -l /dev/loop0
brw-rw-rw- 1 root disk 7, 1 2005-05-03 11:24 /dev/loop0
now, i have a new error, but i don't know exactly what this means:
Code:
$ mount -o loop=/dev/loop0 /home/account/test.img /home/account/mnt
memlock: Operation not permitted
Couldn't lock into memory, exiting.
thanks for any thoughts or assistance...this is really bugging me.