Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chmod

Status
Not open for further replies.

msen

IS-IT--Management
Apr 24, 2001
36
0
0
US
how do I change permission for dir/sub dir?
 
The reply is in the topic, so I'm surely missing something ...
man chmod

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
what I meant - I did chmod 777 * for all directories. It worked. There are sub dirs, instead of going into every directories and do chmod, is there a command that I could use that take care of the permissions.
 
Have you read the man page ?
Most chmod implementations have the -R option.
Otherwise, man find

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I guess that msen is talking about the [red]-R[/red] parameter in the [tt]chmod[/tt] command.

chmod -R 777 *

-R : recurse subdirs

as PHV stated: man chmod

cheers.
 
But also see Thread60-1060438 for a cautionary tale about what happens 'when chmod goes bad'!!
 
remember:

chmod -R 777 *

will do all the files as well as the directories.

one more thing, 777 is bad
 
Usually, there's no issue when making a text file executable, but 777 is just asking for problems. For what purpose do you need to open up the directories?
 
Instead of 777ing a directory, you should consider proper useage of groups.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top