LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Unable to run program, Permission denied (https://www.linuxquestions.org/questions/solaris-opensolaris-20/unable-to-run-program-permission-denied-746399/)

smartgupta 08-10-2009 06:01 AM

Unable to run program, Permission denied
 
Hi All,

I am working on Solaris Sparc 9 and I developed application and in that I want to open any file when any action is happened but when I am trying to do the same.I am getting the error --

Quote:

"Error launching /test.txt", "", "Process.execAndWait",
"java.io.IOException: Cannot run program "/test.txt": error=13, Permission denied at
java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:466) at Process.execAndWait(Process.java:129) at ExecAction.doAction(ExecAction.java:149) at BaseAction.doAction(BaseAction.java:740) at BaseAction$2.doTask(BaseAction.java:465) at Thread.run(Thread.java:240) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:53) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 7 more "
After getting this,I also checked the permission of the file--
$ ls -l test.txt
-rw-rw-rw- 1 Sang staff 191 Aug 7 15:04 test.txt

Still unable to open it.

So please provide me your valuable suggestions for it.

Thanks in advance..
Edit/Delete Message

scoban 08-10-2009 08:10 AM

You are trying to run the "/test.txt" file. Because file has no execute permissions you are getting access denied errors. Just do "chmod +x /test.txt" or fix your code to read the file not to execute it.

smartgupta 08-11-2009 01:33 AM

I need to run any program which is being add to it.it can be script which should be run when specific action occers.
e.g sh test.sh

but getting the same error.

scoban 08-11-2009 01:49 AM

Did you give execute permissions to the file? I cannot see any problem other than file permissions. Just do a "chmod 777 /test.txt". And be sure there is nothing in script that needs root privileges to run. This should be the problem. Can you run the "test.txt" script from command line?


All times are GMT -5. The time now is 08:10 AM.