shell script and Permission denied


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting shell script and Permission denied
# 1  
Old 04-06-2011
shell script and Permission denied

Have the following in a .sh file.

printf "Installing ... \ r"
cd $ ORG_DIR / a_a
. / configure> error.log
Make 1> error.log 2> error.log
make install> error.log

But when I run I get the following.

install.sh: line 270:. / configure: Permission denied
make: *** No rule two make target `install '. Stop.

Can you insert in sh script to give the folder rights for example, something with chmod +x configure?

Anyone have an idea for a solution?
# 2  
Old 04-06-2011
You have . / configure> error.log The slash is surrounded by spaces. Removes those two spaces. And although not required, for better readability, add a space between the e and the greater than sign.

Speaking of readability, please use code tags the next time you post code.
# 3  
Old 04-06-2011
I do not know just what went wrong, but do not have the space in the code. Have posted it here again
Code:
	
         printf "Installing...\r"
	cd $ORG_DIR/a_a
	./configure > error.log
	make 1> error.log 2> error.log
	make install > error.log

But if you have an idea to correct Permission denied problem directly in the script?

Last edited by Perderabo; 04-06-2011 at 12:50 PM.. Reason: add code tags
# 4  
Old 04-06-2011
Well to do what you are asking change install.sh to read:
Code:
chmod u+x configure
./configure > error.log

This assumes that you are running either as root on as the owner of the configure file. Are you sure that you are running install.sh as the proper user?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Permission denied running shell script in opensuse

Hello, I am having an odd problem in open suse 12. I have a shell script and when I try to run it, I get "permission denied" The permissions from ls -l are, -rw------- 1 user1 users 25904 Jan 10 16:26 script.sh I have tried to change the permissions in dolphin but this does not change the... (5 Replies)
Discussion started by: LMHmedchem
5 Replies

2. Shell Programming and Scripting

Trying to create a script to run as root, permission denied

Hello all, I am trying to create a script or a .command file that will run for me and my other techs on many, many Mac OSX computers that will add a file to the /etc/ folder called /etc/launchd.conf Every time I try to run the script, I get "Permission Denied" when trying to put the file into... (13 Replies)
Discussion started by: DonnieNarco
13 Replies

3. Shell Programming and Scripting

Help with Permission Denied on script with sed

I am trying to develop a script to replace a lowercase URLs with an upper case URLs in HTM files. Basically.. replace href="somelowercaseurl" with href="SOMEUPPERCASEURL". In place. the href's are not located in any specific position in the file. Here is my shell script : export... (5 Replies)
Discussion started by: smarty
5 Replies

4. UNIX for Dummies Questions & Answers

Shell Scripting Permission Denied

Everytime I try to run a shell script I get the error message permission denied. So I have googled/searched around and have been using the command chmod u+rwx (filename) to give myself permission to execute my program. However, I was wondering if there was anyway to actually just this to... (5 Replies)
Discussion started by: Jimmyd24
5 Replies

5. Shell Programming and Scripting

Permission denied

I created a user so that when he logs in he will be directed to a menu /etc/passwd user1:x:115:1:Support -SysAd:/export/home/user1:/export/home/suppotrmenu/script.sh However when I logged in remotely from another server by ssh user1@1.1.1.1 , it saysexport/home/suppotrmenu/script.sh:... (4 Replies)
Discussion started by: lhareigh890
4 Replies

6. Red Hat

Permission denied

Hi guys im new to this db i have a small prob while installing websphereportal6.1i think i was installed succesfully but the error im getting is while starting server. check this out # ./serverStatus.sh -all Error loading: /usr/wps61/AppServer/java/jre/bin/classic/libjvm.so: cannot... (1 Reply)
Discussion started by: varma917989
1 Replies

7. Shell Programming and Scripting

Executing expect script giving message as bad interpreter: Permission denied

Hi Gurus, I am new to scripting and needs your help in expect script used for telnet. I wrote a simple script as #!/usr/bin/expect-5.43 -f spawn telnet localhost 2233 expect "password:" send "secret\r" send "i data.cnbc.com\r" send "exit\r" expect eof When I am trying to execute... (2 Replies)
Discussion started by: niks_yv
2 Replies

8. UNIX for Advanced & Expert Users

Permission denied

Hi, I can not execute a .env file $ . /Data/oracle/d03/mydbora/8.0.6/MYDB.env -bash: /Data/oracle/d03/mydbora/8.0.6/MYDB.env: Permission denied Even if : -rwxrwxrwx 1 oracle dba 2903 Mar 5 2007 /Data/oracle/d03/mydbora/8.0.6/MYDB.env Please help. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

9. UNIX for Dummies Questions & Answers

Permission Denied

I just started computer science at UW Milwaukee. When I access the university Solaris system from PuTTY, I get permission denied when I try to access the file I wrote. Now I really have no idea what I'm doing, I just don't understand why I get permission denied in my won directory. Thank You ... (0 Replies)
Discussion started by: howeezy
0 Replies

10. UNIX for Dummies Questions & Answers

./ Permission Denied.

Could someone tell me why I am getting a permission denied message when I attempt to run this on an out file? Thanks! (8 Replies)
Discussion started by: trouscaillon
8 Replies
Login or Register to Ask a Question