- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- run scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 11:52 AM
08-01-2001 11:52 AM
what's I user need to do when I try to run a scripts and get the following error:
sh: ./test.sh: Execute permission denied.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 11:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 11:56 AM
08-01-2001 11:56 AM
Re: run scripts
If you have write access to the file??
chmod 755 test.sh
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 11:56 AM
08-01-2001 11:56 AM
Re: run scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 11:59 AM
08-01-2001 11:59 AM
Re: run scripts
Without giving the execute permission for the script you can run it by
sh test.sh
PRB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 12:05 PM
08-01-2001 12:05 PM
Re: run scripts
This is probably the error I make all too often....give the file 750 but gave the directory 760....
Regards,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 12:21 PM
08-01-2001 12:21 PM
Re: run scripts
Without the x perm on a dir, you cant even cd to it.
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 01:28 PM
08-01-2001 01:28 PM
Re: run scripts
I did understand.
Now, my problem is... the user uzzz is trying to run a script with Cron and the following msg is displayed:
sh: ./_ora/exp1.sh: not found.
but I see de file in the specified dir.
???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 03:08 PM
08-01-2001 03:08 PM
Re: run scripts
Make sure to use the full path of the script you are trying to run. For example if I have a script in /home/richard/scripts
called script1
in the script I would put
/home/richard/scripts/script1
not just
./script1
As I have learned paths are very important.
Here is a past post of mine where I had the same problem.
I qoute Mr. A. CLay
This may not be all be you get the idea, remember the cron environment is intentionally very sparse and stupid; you have to tell it everything. It can barely spell cron on its own.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x026746ff9277d511abcd0090277a778c,00.html
hope this helps
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 03:22 PM
08-01-2001 03:22 PM
Re: run scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2001 07:27 PM
08-01-2001 07:27 PM
Re: run scripts
So good sysadmin practice for cron jobs is to write EVERY command with a leading / (also known as a full path as in /usr/bin/grep rather than just grep). This includes any references to files, and if one script calls another, every script involved must use full pathnames. Also, any special env setups (for example, Oracle) must be 'sourced' within the script.
Essentially, the cron job must explicitly setup everything that is done automatically by /etc/profile and .profile.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 12:04 PM
08-23-2001 12:04 PM
Re: run scripts
after set the rights, the script is running, but the root mail is receiving the msg sh: ./test.sh: Execute permission denied.
???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 12:25 PM
08-23-2001 12:25 PM
Re: run scripts
Instead of ./test in your script do /home/whatever/scripts/test
and test has to have execute premissions.
Try chmod 777 test but this will make this script executable by everyone.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 12:43 PM
08-23-2001 12:43 PM
Re: run scripts
Instead of relative path use the absolute path for the script in cron.
Instead of ./test use /
Use full path even for the commands in script test.
Also give execute permission for the script chmod 755 test.
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2001 01:45 PM
08-23-2001 01:45 PM
Re: run scripts
> /dev/null 2>&1
This stops mail going to root.
Thanks