I am trying to execute a command through exec() in perl. It runs but not with the same results as running it outside the script as a sudoer. I would like to know how can I run the same command as sudo inside the script first to do some tests. I wouldnt like to leave a program opened running as sudo for security reasons. The program Im running is called openRTSP and it makes RTSP connection over TCP. Im guessing that my perl user is not allowed to access the files that openRTSP needs, but i didnt have any success in finding the files.
Thanks in advance.