On Tue, 2002-11-05 at 18:38, Greg wrote:
> Hi,
> how do I set permissions for directories while in text mode.  What is the
> command, and if someone could write an example for me please.
> thanks Greg

Dear Greg,

Of course you should type "man chmod" before proceeding much further.
That said, a few comments:

I prefer to use chmod in numeric mode. As the man page says:
"A  numeric  mode  is  from  one  to four octal digits (0‐7), derived by
adding up the bits with values 4, 2, and 1"

So to set a file readable(4), writeable(2) and executable (1), your
parameters are 4+2+1 (which adds up to 7)

so, typing:
  chmod 700 *
will set permisions for every file in the current directory to:
  -rwx------
It works on directories too, not just files:
  drwx------

Typing:  chmod 765 filename
  will do this:
-rwxrw-r-x

If you want to change all subdirectories to the same permission level,
use the -r (recursive) option:
  chmod -r 700 *
In case you have already discovered it, all subdirectories must be +x or
you will not be able to CD into them.

Hope this helps,
Robert,
in Taiwan







-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to