This command is safe. All files in the web folder has to be owned by the web user and the client group of this website. You should then check your php settings, most likely you run php in a wrong mode, so that the files are not owned by the web user. As php mode, use php-fcgi and enable suexec in the website settings.