screen throws "permission denied"


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting screen throws "permission denied"
# 1  
Old 10-12-2006
screen throws "permission denied"

Hi all,

i've got problem in running a script in background... i have written a script, and i want to run it everytime i log in, but when i log off i want the script to stay (i watch not to run two scripts at one time in the script).

so as a normal user i want to do:

$ screen my_script &

this works only when i'm on a root, but when i do it as a normal user i get:

shmat: Permission denied

i've noticed that i just can't run screen as a normal user...
so... can anyone tell me what the hell is going on?

btw. i'm on SunOS 5.9
# 2  
Old 10-17-2006
try running your script with nohup
# 3  
Old 10-18-2006
yup... tried that... it dosn't work... don't know why though (maybe solaris is a great system Smilie )... maybe i'm using it not right... anyway the scirpt is in PATH, and it's name is... eg. my_scirpt, with that how am i suppose to call nohup?
# 4  
Old 10-20-2006
try putting the script in a subshell in the background ...

(/dir/script </dev/null &)
# 5  
Old 10-20-2006
you meant:

Code:
/dir/script > /dev/null &

it works ok... but when i want to logout (ctrl-d) my putty hangs... just closing it closes the session... and that is somewhat strange... Smilie
# 6  
Old 10-24-2006
i actually meant what i wrote ...
Code:
( /dir/script < /dev/null & )

the way you wrote yours connects your script to your current shell as well as sending any output to /dev/null ... the way i wrote mine, the script takes input from /dev/null while the output goes wherever it needs to go ...

good luck!
# 7  
Old 10-24-2006
Ran into this myself some time ago. The problem is due to permissions on the "device" screen is using. This is why you are getting the "permission denied" error. Can't quite remember which device right now, but I wrote a script to change perms on the device for users wishing to do very close to what you want to do. If I recall, I brought up screen while using another session to poll (cd <device_directory>; while true; do ls -ltr; done), the device list. This way, I could see which device was assigned a user, and know which device to change perms on. Hope this helps... if I remember, I can look for the script tomorrow and post it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

"Permission denied" when trying to SSH my iPhone though password is correct

Hi, I hope this is the correct section in the forum to post as I'm trying to SSH from my MacBook. I was looking to see whether ssh on my jailbroken iPhone 6s (10.3.1) still works fine and was following this old reddit guide. I installed OpenSSH&OpenSSL from Cydia and changed the password using... (7 Replies)
Discussion started by: hss1
7 Replies

2. AIX

SSH connection "Permission denied"

Hello, I tried to connect with root or any other user to AIX using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). i don't know why!! and the PermitRootLogin is yes any help will be appreciated Thanks (7 Replies)
Discussion started by: moudmm
7 Replies

3. Solaris

"Permission denied" when changing IP netmask

hello everyone, I am new on unix systems. I am working with a Solaris 10 OS. When i try to change netmask on certain interface: I get: How can i enable permission for changing that ? I have administrator privileges. Your help is much appreciated. thanks, (13 Replies)
Discussion started by: pablod76
13 Replies

4. UNIX for Advanced & Expert Users

Showing "permission denied" when trying to login in - Montavista Linux

Hello friends, I have scratched my system and after that when I am trying to access the console via root login it's failing with an error message of "permission denied". I am able to access the other login, I am having only problem with root and some other user login. I am using an telnet... (7 Replies)
Discussion started by: sanoop
7 Replies

5. Linux

Showing "permission denied" when trying to login in - Montavista Linux

Hello friends, I have scratched my system and after that when I am trying to access the console via root login it's failing with an error message of "permission denied". I am able to access the other login, I am having only problem with root and some other user login. I am using an telnet... (2 Replies)
Discussion started by: sanoop
2 Replies

6. Solaris

BSM auditing issues, need to audit "permission denied"

Let me preface with I am semi-new to Solaris. I work with it in the labs at work and that's about my extent (although I run Linux at home). Well, a week ago security comes around with updated requirements, some of which are the need to audit all failures. For the life of me I cannot get a... (0 Replies)
Discussion started by: mph275
0 Replies

7. OS X (Apple)

"Permission Denied" while modifying mounted files on MAC

Hi, I have two machines 1. MacOSx (Users --> userMac , IP - a.b.c.d) 2. FreeBSD (Users --> userBSD, IP- p.q.r.s) I want to modify some files of FreeBSD on my MacOS. So, I mounted the FreeBSD folder on my Mac as follows. $ sudo mount -o -P p.q.r.s:/usr/home/user... (5 Replies)
Discussion started by: akash.mahakode
5 Replies

8. UNIX for Advanced & Expert Users

EACCES "Permission denied" while open(2)

guest@ulidtko:~$ id uid=126(guest) gid=134(guest) groups=134(guest) guest@ulidtko:~$ ls -ld /home drwxr-xr-x 8 root root 4096 May 12 19:47 /home guest@ulidtko:~$ ls -l /home ls: cannot open directory /home: Permission denied guest@ulidtko:~$ cat /proc/mounts rootfs / rootfs rw 0 0... (4 Replies)
Discussion started by: ulidtko
4 Replies

9. UNIX for Dummies Questions & Answers

changing password with sudo user " permission denied"

HI All, I am using solaris i created a user adam and updated his permissions in vi sudoers file as follows adam ALL=(ALL) NOPASSWORD: ALL ........... when i create user by logging as sudo user . $ sudo useradd -d /home/kalyan -m -s /bin/sh kalyan sudo: not found ... (6 Replies)
Discussion started by: kalyankalyan
6 Replies

10. UNIX for Advanced & Expert Users

permission denied for ". " (dot space)

Hi, When I try to run a script with ". "(dot space) in my home, it gives me error ".: Permission denied". Any explanation for this behaviour? Thanks in advance, -Ashish (3 Replies)
Discussion started by: shriashishpatil
3 Replies
Login or Register to Ask a Question