Permission 711---RWX---X---X


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permission 711---RWX---X---X
# 1  
Old 03-27-2006
Data Permission 711---RWX---X---X

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  
Old 03-27-2006
That "myprogram" file must be a shell script. Shells need to read a file to execute it.
# 3  
Old 03-28-2006
Data

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!
# 4  
Old 03-28-2006
See our faq area for a discussion of the "#!" line and what happens without it. But to the shell, which is a program, a shell script is a data file. The only way a program can know what is in a data file is by reading the data file. There is no magic data that can be placed in a data file to change this fact.
# 5  
Old 03-29-2006
Quote:
Originally Posted by Perderabo
See our faq area for a discussion of the "#!" line and what happens without it. But to the shell, which is a program, a shell script is a data file. The only way a program can know what is in a data file is by reading the data file. There is no magic data that can be placed in a data file to change this fact.
Sorry to get in the middle. I'm trying to learn us much as I can from this forum, so I keep jumping from thread to thread (of course most of them don't make sense to me as I am a newbie)
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.
# 6  
Old 03-29-2006
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.
# 7  
Old 03-29-2006
I see... good info, txs!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Umask to generate files with rwx permissions for all

i need my script1.sh to generate /tmp/temp.txt with full permissions i.e -rwxrwxrwx 1 user1 users 23 Dec 16 10:52 /tmp/temp.txtmore script1.sh umask 666 echo "hello">/tmp/temp.txt But the script1.sh generates temp.txt with different permissions as shown below. -rwxr-xr-x 1 user1 users... (6 Replies)
Discussion started by: mohtashims
6 Replies

2. UNIX for Dummies Questions & Answers

How to create a Group with rwx permission?

I want to create a GROUP with rwx permission. Also, I want to create a GROUP with root privileges, so that next time i create a user, I just need to add it to any of the groups and privileges automatically applied. please help. Thanks, Shouvanik (4 Replies)
Discussion started by: shouvanik
4 Replies

3. Hardware

scsi for Sun 711 multipack

Hello, I have a sun multipack 711 (6 disk version) I want to add disk and wondered which scsi disk and scsi interface would be appropriate. According to my research the 711 is ultra scsi. Looking on ebay its difficult to ascertain which type of scsi interface would be best. I simply want to... (1 Reply)
Discussion started by: Carlt23
1 Replies

4. Solaris

create user with RWX access to a specific directory in Solaris 10

I need to create a user account for a developer that will allow him rwx access to all resources in a directory. How can I do that? Thanks (5 Replies)
Discussion started by: gsander
5 Replies

5. Solaris

consequence of chmod o-rwx ....

Hi guys I really want to know about the consequence of giving following command, on solaris 10 (sparc.) What would be effect of this on whole system and services running on system and what commands will be required exactly to get back the original perms . I recently tried above command... (3 Replies)
Discussion started by: upengan78
3 Replies

6. UNIX for Advanced & Expert Users

how to set the default file persmission of file to "rwx"

hi. I want to set the default permission for ever new created file to rwxrwxrwx .. I try umask 000 but it does't not give the execute persmission , is there any way to set the default permission for every new created file to rwxrwxrwx .. thankx (9 Replies)
Discussion started by: tahir23
9 Replies

7. SCO

sftp on unixware 711 doesnt have -b option

I installed openssh on 711 to gain ssh and sftp. When i type sftp (installed in /usr/local/bin) i get the following available options usage: sftp host which isnt what i expect. I expect the full implementation : sftp host sftp host]] sftp host]]... (0 Replies)
Discussion started by: townsenn
0 Replies

8. UNIX for Dummies Questions & Answers

permission help

Ok heres the situation I've been studying Solaris 8 for about 6 months now and some things click in my head but others don't. One of the things that don't click are file permissions. For example I login at work and I use the ls -l command to get a long listing of the files w/ the permissions.... (2 Replies)
Discussion started by: eloquent99
2 Replies
Login or Register to Ask a Question