|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (8 bit)
Join Date: Jan 2000
Posts: 142
|
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.
|
|
|
|
|
|
#2 | |
|
Member (11 bit)
Join Date: Feb 2001
Location: Blue Springs, MO
Posts: 1,766
|
Re: Help Please! Changing permissions with chmod!?!?
Quote:
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-27-2002 at 12:42 AM. |
|
|
|
|
|
|
#3 |
|
Premium Member
Join Date: Jun 1999
Posts: 9,231
|
you could use:
find . -type d -exec chmod ### {} \; to change permissions of all directories & sub-directories to whatever you want recursively find . -type f -exec chmod ### {} \; to do the same for files. Along with chown& chmod, do u remember to use chattr? that is a very useful attribute that most forget. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|