[CentOS] Unable to execute a script , Permission denied
Bowie Bailey
Bowie_Bailey at BUC.comTue May 25 13:14:33 UTC 2010
- Previous message: [CentOS] Unable to execute a script , Permission denied
- Next message: [CentOS] Unable to execute a script , Permission denied
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jatin Davey wrote: > Here is the script that i am trying to execute as a non-root user: > > #!/bin/sh > ps -C java -o thcount > /home/proc_threads/tempfile > awk ' { total += $1 } END { print total } ' /home/proc_threads/tempfile > > here is the output when i try to execute as a non-root user: > > ./javathreads: line 2: /home/proc_threads/tempfile: Permission denied > awk: cmd. line:1: fatal: cannot open file > `/home/proc_threads/tempfile' for reading (Permission denied) The script is running, but the 'awk' line is failing to read /home/proc_threads/tempfile. What are the permissions on that file and directory? $ ls -ld /home/proc_threads $ ls -l /home/proc_threads/tempfile -- Bowie
- Previous message: [CentOS] Unable to execute a script , Permission denied
- Next message: [CentOS] Unable to execute a script , Permission denied
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list