View Single Post
Old 03-26-2002, 09:20 PM   #2
Computer Hobbyist
Member (11 bit)
 
Computer Hobbyist's Avatar
 
Join Date: Feb 2001
Location: Blue Springs, MO
Posts: 1,766
Re: Help Please! Changing permissions with chmod!?!?

Quote:
Originally posted by lsakhvoruk
How can I change permissions (owner, group, other) with chmod in such a way so that when I change the permissions for a directory the permissions for all of its contents (files, sub directories, etc) change as well? I know that it can be done is KDE but what about using chmod on command line? Thanks! Leo.
chmod is intended to be used at the command line. The following operates recursively, changing the access mode of subdirectories and files beneath a specified directory.

chmod -R mode files

Changes in ownership of specified files are accomplished by the command chown.

chown -R userid files operates recursively, changing the owner of the subdirectories and files beneath a specified directory.

I nearly forgot, changes in group are accomplished with the command chgrp. Recursive changes follow the above syntax-- chgrp -R group files

The group must be named in the /etc/groups file, maintained by the newgroup command.

One final thing, if you want to learn more about chmod open a terminal and type man chmod. It will tell you all you need to know about using chmod at the command line. An alternative is to type chmod --help at the command line.

CH

Last edited by Computer Hobbyist; 03-26-2002 at 11:42 PM.
Computer Hobbyist is offline   Reply With Quote