in reply to mounting device from a script

Have you read perlsec? There is plenty of wisdom there regarding running with elevated privileges.

[my script] needs to mount/umount the device

How does it do this? If it shells out, you can just run mount/umount with sudo and then your script won't need any elevated privileges in the first place.


🦛