chmod 777chmod(string $filename , int $permissions ): bool Attempts to change the mode of the specified file to that given in permissions.chmod 777 is considered potentially dangerous because you are giving read, write and execute permission on a filedirectory to everyone.