chmod all the subdirectory and files are 777 on fedora13 (linux )

Kin Fat SZE
Kin Fat SZE used Ask the Experts™

under my fedora directory /usr/share/tomcat6/webapps
I want all the files and directory are chmod to be 777

How could I do this at once?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

chmod 777 *
while in the folder :)

chmod -R 777 /usr/share/tomcat6/webapps/*

the -R means do it recursively for all subfolders..

Here is three programs you can use:

Chmod # Changes file/folder permissions (as you already seem to know)
chown # Changes file/folder user ownership
chgrp # Changes file/folder group ownership

All three of these programs can use "-R" to change fils/folders recursively. Use "-f" to just do it without prompting or error warning.

So, to enable write permissions to a directory and everything below it, use:
chmod -Rf +w <dir>

To Change ownership:
chown -Rf <user> <directory

And to change group:
chgrp -Rf <group> <dir>

If you want to just get directories try chmod -R 777 */

Hope this helps.
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.


for al files and subfolders

chmod -R 777 /usr/share/tomcat6/webapps/

Distinguished Expert 2017

For security consideration you should not set these or any folders/directories with 777 unless there is a specific reason, i.e. you have an upload directory which should have 733 that would allow writes but not reads.

For buletin/message board where the data is stored in files is the only folder/directory that can be set with 777 but make sure no uploads can be directed there as it could be used to circumven/attack your web server by uploading something that upon access will get the webserver to executed the code within.
change owner should be my goal,
Sorry, I misunderstand the right of owner and permission

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial