[Novalug] Sample shell code...
karhunhammas at Lserv.com
Fri Feb 23 18:55:49 EST 2007
On Fri, 23 Feb 2007, donjr wrote:
> On Fri, 2007-02-23 at 11:28 -0800, Beartooth wrote:
>> Let me try it another way. I don't see offhand
>> when/how/why I would want to have an executable file in my
>> home directory, and deny *myself* permission to execute it.
>> Yet those of you old gray elephants with survival scars take
>> it for granted that you not only do want that, you want it to
>> be the default.
> CORRECT and by default you also don't what the current
> directory on your PATH like MS-DOS does/did by default.
> Also it isn't just "old gray elephants with survival scars".
> It's anyone who has been past the beginner level(s) in basic
> system security.
... as I certainly haven't, true : you have to more basic
stuff than I do just to follow it.
>>>> I tried it first with plain "chmod +x" and it ran. What does
>>>> the "u" do?
>> All right, I saw that array at the top of the chmod man
>> page. I *think* you're saying something I had no hint of :
>> that the way the array is *used* is that "chmod u+x" is
>> specific and explicit -- and that "chmod +x" defaults to it.
> NO "chmod +x" defaults to "chmod a+x" as in 'ALL'. The 'u' is
> for the USER only set of flags.
Aha! So it's the other way around. You comfort me ; it's
better than having been way off in left field somewhere ...
>> There again, the unspoken but obviously strong and
>> ubiquitous reluctance to have executable files, even in your
>> own directory, with permission for you yourself to execute
>> them. I'm convinced; but I'm still puzzled.
> Having an executable in a directory that you also have WRITE
> permission to is dangerous as it means the executable can also
> accidently be changed or deleted.
Oho! And also aha! Shudda thunka that; hadn't; and
doubtless wouldn't've till it bit me, if then. Damn, I'm glad I
started asking this stuff ...
Beartooth Staffwright, PhD, Neo-Redneck Linux Convert
I have precious (very precious) little idea where up is.
More information about the Novalug