Ubuntu – default permissions for /var/www

Apache2chmodpermissionsPHP

I was trying to open a file and write to it with PHP at /var/wwwfolder
but it wasn't working so I did

sudo chmod 777 /var/www

now I want to set the permissions for /var/www to the default.
what are the default permissions for /var/www?

Best Answer

The permissions on this folder are:

chmod 755 /var/www/

and the files inside the folder are:

chmod 644 /var/www/file
Related Question