i wrote a script that creates an encrypted loop, and mounts a filesystem image.
i dont want to have to become root every time i mount my encrypted file system, but the script needs root access to setup the loop (with the losetup command)
so i wrote my script, saved it. and as root...
chown 700 myUser /home/user/bin/script
chown user /home/user/bin/script
chmod +s /home/user/bin/script
(i also tried chmod u+s)
so why does the mount command complain that only root can do that!
i thought setting an executable as SUID ROOT made it run with root privilages ! ?
/sbin/losetup -e aes /dev/loop1 /home/chris/encrypted.fs
mount /dev/loop1 /home/chris/secret/
/sbin/losetup -d /dev/loop1