![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Permission? | rahulrathod | UNIX for Dummies Questions & Answers | 1 | 02-13-2006 12:31 PM |
| permission | dozy | UNIX for Dummies Questions & Answers | 1 | 12-28-2004 11:00 AM |
| permission help | eloquent99 | UNIX for Dummies Questions & Answers | 2 | 02-12-2003 04:30 AM |
| su permission | siavoush | UNIX for Dummies Questions & Answers | 12 | 06-15-2002 11:56 PM |
| Ftp permission 644 | cagnod | UNIX for Advanced & Expert Users | 4 | 04-10-2002 06:42 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I have a file with permisson 711; but when an other user run the program, it can't open. This is the message:
/sbin/sh: ./myprogram: cannot open Can any1 tell me why please? Thanks! #2 1 Day Ago Perderabo Unix Daemon Join Date: Aug 2001 Location: Rockville Md Posts: 5,439 That "myprogram" file must be a shell script. Shells need to read a file to execute it. Question: Is this mean in the beginning of the program I have to have: /sbin/sh codes codes codes ....... Thanks! |
|
||||
|
Quote:
I went to FAQ section, and read the thread (nice!), but I came up with one question regarding permissions: would it work if the script file had "read" permission but not "execute"? I'm sorry to make such questions, but I'm currently learning UNIX theoretical aspects, as I have limited access to the system. Thanks, panchopp. |
|
|||||
|
Without execute permission, the kernel will refuse to execute it. It depends on the shell if you can do stuff like:
shell shellscript However if the file is already open, the shell will no way to check. So this will work with read permission only with any shell: shell < shellscript I do that with one-time shellscripts...it saves a few keystrokes and makes it unlikey that I will accidentally rerun the script. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|