Script running even after execute permission removed.


 
Thread Tools Search this Thread
Operating Systems Solaris Script running even after execute permission removed.
# 1  
Old 09-04-2012
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 permissions for root also but still whenever the server is rebooted, we see that the services are enabled and we even made changes in rc script but still we see these services are running.

Need your help on this.


Thanks in Advance.

Regards,
Rocky
# 2  
Old 09-04-2012
Scripts without execute permissions can still be sourced.

What are the contents of this file? Its permissions? Where is it placed?
# 3  
Old 09-05-2012
hi ,
this script is in default run level .. first you find where script is running and also chk any symbolic link are create ...
your script in default run level if yes . then u remove it
# 4  
Old 09-05-2012
Hi Corona,

This script is an application for BMC which is not being used. It is an application named Dashboard which is used in BMC.It resides in /opt.

As you mentioned above, ' Scripts without execute permissions can still be sourced.' can you please name few scripts for my knowledge in future.

Thanks
Rocky

---------- Post updated at 09:21 AM ---------- Previous update was at 09:19 AM ----------

Hi Coolboys,

I had earlier done the same as you mentioned it but still it is running.

Regards,
Rocky
# 5  
Old 09-05-2012
Quote:
Originally Posted by Rockyc3400
Hi Corona,

This script is an application for BMC which is not being used. It is an application named Dashboard which is used in BMC.It resides in /opt.

As you mentioned above, ' Scripts without execute permissions can still be sourced.' can you please name few scripts for my knowledge in future.

Thanks
Rocky

---------- Post updated at 09:21 AM ---------- Previous update was at 09:19 AM ----------

Hi Coolboys,

I had earlier done the same as you mentioned it but still it is running.

Regards,
Rocky
I had the same issue some time ago,and i simply solved it by commenting the commands inside the script,hope it helps.

Regards.
This User Gave Thanks to charli1 For This Post:
# 6  
Old 09-05-2012
Can anybody please explain whats going on here below...Smilie

Code:
$ cat test.sh
echo "print"

$ sh test.sh
print

$ ./test.sh
-bash: ./test.sh: Permission denied

$ ls -lt test.sh
-rw-rw-r-- 1 gerbil gerbil 13 Sep  5 10:34 test.sh

$ chmod 754 test.sh

$ ./test.sh
print

$ ls -lt test.sh
-rwxr-xr-- 1 gerbil gerbil 13 Sep  5 10:34 test.sh

# 7  
Old 09-05-2012
Quote:
Originally Posted by pamu
Can anybody please explain whats going on here below...Smilie
When you run it with 'sh scriptname', you're not executing scriptname -- you're executing sh, a separate program. All it does is read the script.

When you run it with ./test.sh, you need permissions to execute the file, since you're running it direct.

'Gerbil' is a great name for a test user. Smilie

Last edited by Corona688; 09-05-2012 at 11:59 AM..
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

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 weekly_us_push_rpts_tst.sh: ./vacation_quota_summary_detail.sh: Execute... (9 Replies)
Discussion started by: krupasindhu18
9 Replies

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. UNIX for Dummies Questions & Answers

No permission to execute file

I am logged in as root and am trying to execute a file called x_cleanup_equdata but keep getting the message ksh: x_cleanup_equdataNEW: 0403-006 Execute permission denied. I did FTP this file from another server using GET, would this make the difference? I tried chmod 666 but still no luck. ... (2 Replies)
Discussion started by: markbeeson
2 Replies
Login or Register to Ask a Question