Execute permission for shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute permission for shell script
# 1  
Old 04-02-2014
Execute permission for shell script

Hi All,

I am not able to figure out what is the problem with calling a shell script within a shell script.
i have given all the permissions to both schell scripts.
but when i am seeing the log file error is coming like
Code:
weekly_us_push_rpts_tst.sh[275]: ./vacation_quota_summary_detail.sh: Execute permission denied.

Note1:- my main shell script name is weekly_us_push_rpts_tst.sh and i am calling ./vacation_quota_summary_detail.sh within main shell script.


Note2:- ./vacation_quota_summary_detail.sh is executing successfully but i am getting
Code:
weekly_us_push_rpts_tst.sh[275]: ./vacation_quota_summary_detail.sh: Execute permission denied.

ERROR in my log.

can any body tell what could be the problem?

Thanks Advance.

Thanks,
krupa


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data. Thanks

Last edited by vbe; 04-02-2014 at 11:09 AM.. Reason: code tags please NOT Bold Char!!
# 2  
Old 04-02-2014
What do you call all permissions? who is executing the script? what are the current directory perrms? etc...
# 3  
Old 04-02-2014
Execute permission for shell script

i have given permissions to 777 to all and i am the owner and current directory permission is -rw-r--r--
# 4  
Old 04-02-2014
Both shellscript in the same directory (strictly)?
# 5  
Old 04-02-2014
You wont go very far with current directory permission is -rw-r--r--... Therefore the question above...
That said, It is kind of you to think we are some sort of wizzards... only we are not and I am not very good at guessing...
What answer do you think we can offer with the given information?

We dont know the OS
We dont know what shell is used
We dont know what the calling script if for
We dont know what the called script does..
we know only the message you get:
Code:
weekly_us_push_rpts_tst.sh[275]: ./vacation_quota_summary_detail.sh: Execute permission denied.

# 6  
Old 04-02-2014
Quote:
Originally Posted by krupasindhu18
i have given permissions to 777 to all
777 is not the magic sledgehammer to fix all permissions problems. Do you really want that file to be freely edited by random attackers?

Try 755.
# 7  
Old 04-02-2014
How about:
Code:
chmod +x [/path/to/]filename

Hth
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Allow user without dir write permission to execute a script that creates files

In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies

2. Debian

Execute permission problem

Hello, I need to install a program from a DVD. It uses a sh script called setup. root@ragnok: head -2 /media/cdrom0/setup #!/bin/sh root@ragnok: ls -l /media/cdrom0/setup -r-xr-xr-x 1 root root 4688 Nov 8 08:38 /media/cdrom0/setup root@ragnok: /media/cdrom0/setup bash:... (2 Replies)
Discussion started by: snorkack59
2 Replies

3. Solaris

Script running even after execute permission removed.

Hi All, I'm new to solaris and this site but the advices in this site have helped me a lot. Today i am facing a new issue. We have a script for BMCDashboard and this script is not supposed to run evrytime the server is booted so we disabled the services and removed the execute... (7 Replies)
Discussion started by: Rockyc3400
7 Replies

4. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

5. Shell Programming and Scripting

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... (3 Replies)
Discussion started by: Mumie
3 Replies

6. Shell Programming and Scripting

How to use ssh execute other shell script on other host (shell script include nohup)?

i want use ssh on the host01 to execute autoexec.sh on the host02 like following : host01> ssh host02 autoexec.sh autoexec.sh include nohup command like follwing : nohup /home/jack/deletedata.sh & after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
Discussion started by: orablue
1 Replies

7. Shell Programming and Scripting

How to execute a script without giving x permission to the file?

How to execute a script with out giving x permission to the file? (7 Replies)
Discussion started by: praveen_b744
7 Replies

8. UNIX for Advanced & Expert Users

Script without read permission but execute the script

I have a script, except me no one can read the script but they can execute the script. Is it possible? (14 Replies)
Discussion started by: kingganesh04
14 Replies

9. Shell Programming and Scripting

Only Execute Permission for Others...

This might be very silly question but i dont know y is it so... i Have script I have Given the permissions in the following manner... -rwxrwx--x 1 root system 3 Jun 08 15:46 temp I want no one to see what is present in that but should be able to execute it.. but when... (3 Replies)
Discussion started by: pbsrinivas
3 Replies

10. Shell Programming and Scripting

without execute permission

how can a script run without execute permissions. when i run myscript as : sh a.sh it was working but when i say simple a.sh its not working since it has no x permission.but how about fist case? (1 Reply)
Discussion started by: Raom
1 Replies
Login or Register to Ask a Question