- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Problem executing files
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
03-12-2003 05:19 AM
03-12-2003 05:19 AM
Problem executing files
I've got a somewhat interesting problem with a Linux Redhat 7 workstation.
The user has created a simple script that will print 'Hello World' on the screen once executed.
The file permission are set to 777 and once executed we get the following error:
bash: ./hello: Permission denied
So I logged in as root, and the results were the same. We tried creating another small and simple script and the problem persists... so I moved the file to another workstation to see if it would run, and it did - without any errors.
I've checked the passwd file to see if there was anything fishy going on with the groups the user was part of, but i couldnt find any problem.
Does anyone have any ideas ? Is it possible to remove executable permissions on a file system regardless if the 'X' flag is set on specific files ?
Any thoughts or ideas are appreciated.
Chris P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 05:55 AM
03-12-2003 05:55 AM
Re: Problem executing files
Error "bash: ./hello: Permission denied " can be translated as :
bash: In the command: ./hello could not execute the interpreter /bin/sh. Reason: Permission denied.
Try: ldd /bin/bash
Check that you have got execute permission for all of the libraries.
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 01:07 PM
03-12-2003 01:07 PM
Re: Problem executing files
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 02:16 PM
03-12-2003 02:16 PM
Re: Problem executing files
#!/bin/bash
or
#!/bin/sh
or
#!/bin/ksh
that is everything
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 04:02 PM
03-12-2003 04:02 PM
Re: Problem executing files
As you've neglected to even say what the script's name is, all of our responses are going to have a certain amount of guess work in them.
Here's my guess work..
The line that is supposed to print "hello world" has the two words 'hello' and 'world' on it, and that's all, yes?
In order to print to the screen from a shell script, you need to use the command 'echo'. So to 'print' hello world to the screen from a scrpt, you'd need a line like:
echo hello world
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 10:34 PM
03-12-2003 10:34 PM
Re: Problem executing files
i guess there is some thing simple which you are overlooking.
1. can u do a ll -d on the directory and post the output.
2. can u post the script hello.
3. can u tell the location of bash (which bash)
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2003 10:37 PM
03-12-2003 10:37 PM
Re: Problem executing files
i guess there is some thing simple which you are overlooking.
1. can u do a ll -d on the directory and post the output.
2. can u post the script hello.
3. can u tell the location of bash (which bash)
-balaji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2003 01:05 AM
03-13-2003 01:05 AM
Re: Problem executing files
Perhaps it will produce some useful debug info.