Executable?
Condon Thomas A KPWA
tcondon
Mon May 17 11:49:13 PDT 2004
Net Llama! wrote:
>
>> I'm sitting here looking at two Sony Vaio laptops. Both have a
>> directory that contains our test software. In this directory (on
>> both machines) is a file called Testit. An ls -l of Testit on the
>> old machine returns:
>> -rwxr-xr-x 1 root root 60 Jun 25 2001 Testit
>>
>> The new machine is only different in size (echo statements to
>> indicate progress) and date (just created). The executable script
>> is the same.
>>
>> On both machines I am logged on as root. On the newer machine I can
>> not execute this file. It returns:
>>
>> wobbly nfcs # Testit
>> bash: ./Testit: Permission denied
>>
>> The old (working) machine is running RedHat 6.2. The new machine is
>> running a newly installed Gentoo system.
>>
>> OK, I'm baffled. I've got the permissions set right, I've got '.'
>> included in my path (yes, I know that can be dangerous), the
>> executable contents are identical. What gives? The answer is bound
>> to be so simple I'll hit my forehead with a brick when I find it,
>> but can someone speed that process up?
>
> man chattr ?
Well, hm, OK, that is interesting. But how does it apply? Entering:
chattr -i /nfcs/Testit
has no effect on the file's executability.
Anyway, it did get me thinking about the fact that the test directory is in
its own partition, so I typed mount and found it to be mounted:
/dev/hda8 on /nfcs type ext2 (rw,noexec,nosuid,nodev)
What?!? No execution? So I checked /etc/fstab and it is listed:
/dev/hda8 /nfcs auto defaults,user 0 1
So where does this (rw,noexec,nosuid,nodev) come from? All of my partitions
are mounted "defaults" and the others have only (rw).
More importantly, how can I change it? If I unmount it and remount using:
mount /dev/hda8 /nfcs
it is mounted (rw) and I can execute the script.
In Harmony's Way, and In A Chord,
Tom :-})
Thomas A. Condon
Barbershop Bass Singer
Registered Linux User #154358
A Jester Unemployed
More information about the Linux-users
mailing list