Re: [expert] directory permissions

2002-09-25 Thread bascule

cheers todd,
also messing me up was something i found on a bsd site that seems to apply to 
linux as well but i don't recall seeing it mentioned before:
i read that permissions get processed in the order u,g,o and when the running 
user matchs one of those - the processing stops! - which means that if a file 
is:
 -rw-r-x--- apache apache  somefile
then even though user apache is a member of group apache, the group has the 
'x' bit set, user apache does not have that particular permission, such a 
simple little thing :-) obviously there is no reason why a user should have 
less permssion than the group it's in but it doesn't follow neccessarily that 
this would lead to not having the group permissions applied, i was staring at 
the screen listing for ages and although i saw that situation existed it just 
didn't occur to me that it was causing my problem!


bascule
(living and learning since 1967)


On Tuesday 24 September 2002 4:27 am, you wrote:
> bascule wrote on Tue, Sep 24, 2002 at 01:21:07AM +0100 :
> > i think i'm coming unstuck about the difference between 'r' - read
> > permission and 'x' -enter perm for a directory, what exactly is the
> > difference?
>
> IIRC, when you set ONLY the x bit for a directory, a user can access
> files in that directory if they know the exact name, but they cannot do
> a directory listing.  Try it:
>   cd ~
>   mkdir test1
>   touch file{1,2,3}
>   chmod 111 test1
>   ls -l
>   ls -l test1
>
-- 
"Yes, it's the right planet, all right, " he said again. 
"Right planet, wrong universe. "



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] directory permissions

2002-09-24 Thread Steven Plumb



Or, if you are familar with Octal you can coorilate the octal bits with the 
respective permissions.



On Monday 23 September 2002 10:06 pm, you wrote:
> Hi.  R means the person has  the ability to read the files contents. X
> means the user can exicute the file as a program.
> Personally, I find working with the numbers is much easier to work with.
> Keep in mind you have three columns you need to fill in with permissions.
> You have user, group, and other.
>
> 0: no permissions.
> 1: Execute.
>  2: write.
> 4: Read.
> 5: Read, execute.
> 6: Read, write.
> 7: Read, write, execute.
>
> So let's say you want a file/directory to be set with read write  for user
> and group you would write.
>
> chmod 660 filename
>
>
> If you want to make something accessible to one user you would do this.
>
> chown username filename
> chmod 600 filename
>
> - Original Message -
> From: bascule <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 23, 2002 8:21 PM
> Subject: [expert] directory permissions
>
> > i think i'm coming unstuck about the difference between 'r' - read
>
> permission
>
> > and 'x' -enter perm for a directory, what exactly is the difference?
> >
> > bascule
> > --
> > "Yes, it's the right planet, all right, " he said again.
> > "Right planet, wrong universe. "
>
> ---
>- 
>
> > Want to buy your Pack or Services from MandrakeSoft?
> > Go to http://www.mandrakestore.com



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] directory permissions

2002-09-23 Thread Todd Lyons

bascule wrote on Tue, Sep 24, 2002 at 01:21:07AM +0100 :
> i think i'm coming unstuck about the difference between 'r' - read permission 
> and 'x' -enter perm for a directory, what exactly is the difference?

IIRC, when you set ONLY the x bit for a directory, a user can access
files in that directory if they know the exact name, but they cannot do
a directory listing.  Try it:
  cd ~
  mkdir test1
  touch file{1,2,3}
  chmod 111 test1
  ls -l
  ls -l test1

You'll get permission denied.  BTW, don't do this as root, or it won't
matter WHAT permissions you set it, root can still look into it.

Then the next interesting note.  You can't delete it.  Try it:
  rm -rf test1

It won't let you.  You have to change the mode of the directory, then it
will let you:
  chmod 700 test1
  rm -rf test1

Blue skies...   Todd
-- 
   MandrakeSoft USA   http://www.mandrakesoft.com
Mandrake: An amalgam of good ideas from RedHat, Debian, and MandrakeSoft.
All in all, IMHO, an unbeatable combination.   --Levi Ramsey on Cooker ML
   Cooker Version mandrake-release-9.0-0.3mdk Kernel 2.4.19-12mdk



msg58000/pgp0.pgp
Description: PGP signature


Re: [expert] directory permissions

2002-09-23 Thread Thomas Ward

Hi.  R means the person has  the ability to read the files contents. X means
the user can exicute the file as a program.
Personally, I find working with the numbers is much easier to work with.
Keep in mind you have three columns you need to fill in with permissions.
You have user, group, and other.

0: no permissions.
1: Execute.
 2: write.
4: Read.
5: Read, execute.
6: Read, write.
7: Read, write, execute.

So let's say you want a file/directory to be set with read write  for user
and group you would write.

chmod 660 filename


If you want to make something accessible to one user you would do this.

chown username filename
chmod 600 filename

- Original Message -
From: bascule <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 8:21 PM
Subject: [expert] directory permissions


> i think i'm coming unstuck about the difference between 'r' - read
permission
> and 'x' -enter perm for a directory, what exactly is the difference?
>
> bascule
> --
> "Yes, it's the right planet, all right, " he said again.
> "Right planet, wrong universe. "
>
>






> Want to buy your Pack or Services from MandrakeSoft?
> Go to http://www.mandrakestore.com
>




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



[expert] directory permissions

2002-09-23 Thread bascule

i think i'm coming unstuck about the difference between 'r' - read permission 
and 'x' -enter perm for a directory, what exactly is the difference?

bascule
-- 
"Yes, it's the right planet, all right, " he said again. 
"Right planet, wrong universe. "



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com