Runs chmod on php fpm sock file only once. Fixes #740