LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 08-10-2009, 07:01 AM   #1
smartgupta
Member
 
Registered: Sep 2008
Posts: 81

Rep: Reputation: 15
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
 
Old 08-10-2009, 09:10 AM   #2
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
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.
 
Old 08-11-2009, 02:33 AM   #3
smartgupta
Member
 
Registered: Sep 2008
Posts: 81

Original Poster
Rep: Reputation: 15
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.
 
Old 08-11-2009, 02:49 AM   #4
scoban
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: Slackware
Posts: 145

Rep: Reputation: 16
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to set time : Permission denied dipuasks Linux - General 7 04-10-2010 06:10 PM
bash: ./program: permission denied Cinematography Linux - General 3 10-01-2007 09:18 PM
Permission Denied when trying to run /etc/vsftpd.conf Jack of Spades Linux - Newbie 2 06-10-2007 08:33 PM
Permission Denied when running a program? tolvar Linux - Newbie 1 09-07-2005 09:18 AM
bad interpreter: Permission denied when compile any program docesam Linux - Software 4 06-06-2003 12:05 AM


All times are GMT -5. The time now is 04:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration