How to chmod 777 recursively for files underneath a folder?

+1 vote
asked Jul 4, 2018 in Web Hosting by jcooper (250 points)
How to chmod 777 recursively for files underneath a folder?

1 Answer

0 votes
answered Jul 4, 2018 by Avarado (18,660 points)
I don't recommend giving all permissions to everyone on every file since that's not secure at all and puts your website at risk for being hacked and destroyed.

But if you need to chmod all files you can do so by following the below instructions.

Once again giving 777 permissions in public directory is not advised..
But if you need or want for some reason here's how to do so.
PHP Code:
chmod -R 777  /home/admin/domains/domain_name/public_html/folder/  
Also if you want to learn more about chmod you can
type man chmod in the terminal

Once again giving 777 permissions to files in public directory is not a good idea and if you're just testing something out you need to reset the permissions before making the website go live and available to the public otherwise you risk having your website hacked or destroyed.

21,236 questions

22,853 answers

113 comments

767,379 users

...