I need to run a perl code from java code in solaris. I used . I am running the java code as root user. The perl executable has different ownership permission. Moreover the root user doesn't have permission to execute the perl executable. In short its like this -rwxr-x--- 1 myownuser:myowngroup 10816 Aug 10 05:56 perl root user is not part of myowngroup. So when i execute the java program i am getting the following exception
[list]How can i solve the above issue. One thing i can think of is changing the permission of the executable (even with in java code) before actually running perl script. But i wont be able to do this because of certain constraints.
When i run perl test.pl i am able to get the output. Here too i should get some exception rite, because the command is getting executed as a root.
Ernest Friedmann-Hill had a look at the source code, and found out, that Java is checking permissions (user, group, other) without checking whether the user is root, and therefore bypassing the normal permissions.