identifying what's running ( was Re: [Novalug] "10 Linux commands you've never used" article)
Kevin Dwyer
kevin at pheared.net
Fri Feb 23 14:43:00 EST 2007
On Fri, Feb 23, 2007 at 11:15:43AM -0800, Beartooth wrote:
> On Thu, 22 Feb 2007, Garrett Nievin wrote:
>
> >Try chmod 755 WhatsitDo2. You need to see the "x" bit on in
> >the "ls -l" listing...
>
> OK : I've run into chmod with number code before. Like
> chmod itself, I have a vague abstract idea of what it does -- and
> can never quite seem to keep it straight in my head. <sigh>
>
> Is it a fact that "chmod 755" and "chmod +x" and "chmod
> u+x" are a classic linuxian example of three ways to do the same
> thing? If so, is there one of them I'm more likely to get
> straight first than the others? I've gotta sneakin hunch I'm
> creepin' up on the level where I'm bound to start needing a lot
> of the commands I've shied off learning for years, for fear of
> destroying something...
The octal notation is a concatenation of the sums of individual values.
The bits: execute=1, write=2, read=4
So, 755 (there is an assumed leading 0 to hold the place of the
setuid/sticky bits), means user:(4+2+1),group:(4+1),other:(4+1).
Replace 4, 2, and 1 with the permissions above and you know the ways
this file may be accessed.
-kpd
More information about the Novalug
mailing list