PDA

View Full Version : Permissions error



wintermute000
14th November 2005, 11:43 AM
Hi all

Can someone give me an idea on why I"m getting permission denied when trying to run the below file (ls print pasted)
-rwxrwxrwx 1 johannlo lan 84 Nov 14 21:16 login-wintermute

The file "login wintermute" as you can see has execute permission for everyone. To make matters worse I"m logged in as the owner!!!

Its not the contents as its just a simple script that runs fine if I type the exact same commands out....

As far as I can see
a.) execute is allowed for ALL users
b.) I am logged in as the owner

???!?!@?!@

Thanks for any help

kalpana
14th November 2005, 11:52 AM
plz try it from root login.

It should run from root login.

wintermute000
14th November 2005, 12:08 PM
Forgot to mention, but yes I can run it as root

BUt I want to be able to run it without root (and without sudo, I've already added the command which the script runs into my sudo file), apologies, forgot to mention it above

kalpana
14th November 2005, 12:20 PM
okay...
From root user change file permission 777. so you can run it from common user.

GrahamB
14th November 2005, 12:26 PM
Hi Johannlo!

Here is an example:


root:arthur:/backups/arthur_20051112: # ls -la
total 12
drwx------ 2 root root 4096 Nov 14 07:19 .
drwxr-xr-x 32 root root 4096 Nov 12 11:55 ..
-rwxrwxrwx 1 graham src 28 Nov 14 07:19 graham.sh
The file graham.sh just does an echo. It also has chmod 777. But note the directory has no wrx rights for anyone, excepting root.

(I believe:) The general idea is that if any one of the directories up the directory-tree restricts rwx access to johannlo, then johannlo will not be able to exercise that restriction.

Check all directories in the parent path!
Yours

wintermute000
14th November 2005, 12:57 PM
CHeers thanks