Handle permissions for www-data on cache and logs folders