[NTLUG:Discuss] NFS Resolution
Greg Edwards
greg at nas-inet.com
Fri Sep 7 20:18:04 CDT 2001
Michael Patrick wrote:
>
> Hi Patrick.
>
> Unix permissions work like this:
>
> 1 - execute (or traverse if a directory)
> 2 - write
> 4 - read
>
> further.. the groupings are
>
> owner group others
>
> so 755 = rwxr-xr-x
>
> Read/Write/Execute for owner
> Read and Execute for owner's groups and Others
>
>
> The utility to change permissions is chmod
>
> chmod -R 755 michael.users testdir
>
> means that I want to assign rwxr-xr-x to testdir AND everything below it (-R is recurse)
>
> Michael
Nice explanation Micheal. Did you mean to put the "michael.users" in
that example? The command line is "chmod [options] [modes] file..."
where file is multiple.
To add a simplicity when using chmod you can use the alpha characters to
set the modes.
rewritting the above example for testdir
chmod -R u=rwx,g=rx,o=rx testdir
This method has the advantage that only the class(es) included on the
command line get changed. A second advantage is that by using a plus
(+) or minus (-) instead of the equal (=) you can change just the mode
for just the class you want changed.
chmod -R o-r testdir
will remove read permissions all the way down for other.
You can also use the special "a" class which means all. This is a
shortcut if you want all classes to have the same access.
chmod -R a=rwx testdir
will give rwxrwxrwx to testdir and down.
--
Greg Edwards
New Age Software, Inc.
http://www.nas-inet.com
More information about the Discuss
mailing list