The recommended way of setting files and folders permissions in the joomla root directory is the following (from the help.ubuntu website)
cd /var/www/joomla/
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
Can anyone explain the purpose of the {} and the \ in the two chmod statements above?
the
find
command returns a list of files, and the-exec
parameter executes on each listed file the commandchmod 644
. The brackets allows the user to specify where in the command is used the listed filename...the
\;
is used to specified the end of the command (in this case, the end of thechmod
command)see
man find
:http://unixhelp.ed.ac.uk/CGI/man-cgi?find