- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script file creation problem
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
10-14-2004 04:03 AM
10-14-2004 04:03 AM
I have created a simple script that displays contents of a file. The problem I
am running into seems to stem from another problem I had run into before, I think.
After I created the file I did a chmod 777 on it. Then everytime I tried to run
the script, I receive "sh: scriptname: not found." But if I put a ./scriptname, it works.
I decided to create a test user to see if the problem was with my user id and
everything worked correctly.
The only difference I see between my actual user and my test user is the Start-Up
Program in SAM.
This is where the earlier problem I ran into must be the factor. I had to change the
Start-Up Program from /usr/bin/sh to /sbin/sh so I could make FTP work. I do not have
an /etc/ftpd/ftpusers file so I know that cannot be the problem.
My question is this, 1) Why am I having problems running this simple script that
I created and 2) Do I really need the Start-Up Program to list /sbin/sh for this
user id to FTP?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:09 AM
10-14-2004 04:09 AM
Re: Script file creation problem
/sbin/sh or /usr/sbin/sh??
what are the perms on /sbin/sh
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:14 AM
10-14-2004 04:14 AM
Solutionmark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:29 AM
10-14-2004 04:29 AM
Re: Script file creation problem
Because when you try to execute your script, your shell searches the PATH for the `scriptname` and if the commandâ s PATH comes before your script's PATH, then your shell will try to execute the `command` instead of your script.
And that `command` must be requiring Root privileges to run(/sbin/sh is a rootâ s shell).
Your script works when you give ./ that is because of the same reason. Since you specify the current directory and run your script, it does not search the PATH for the `scriptname` and runs it from the current directory.
Please let me know whether it resolves your issue.
Sid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:34 AM
10-14-2004 04:34 AM
Re: Script file creation problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:39 AM
10-14-2004 04:39 AM
Re: Script file creation problem
-Good luck
Govind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:40 AM
10-14-2004 04:40 AM
Re: Script file creation problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:41 AM
10-14-2004 04:41 AM
Re: Script file creation problem
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2004 04:49 AM
10-14-2004 04:49 AM
Re: Script file creation problem
mark