I am trying to set permissions with
sudo 775 - R /var/www/
on all folders and all files in the
www folder of lamp for
Is this the correct way to set up the system?
The proper permission under /var/www/ is 755 for folders and 644 for files.
The short command to set folder and file under /var/www/ to 755 and 644 is:
These are simple commands so you will get all folder and files into these permissions, of course, that is not the best practice, it would better if you set spesifically the folders or files that you want to set (I edit this answers after considering comments from AzkerM).