chmod 777chmod is used to change the permissions of the actual file. When you execute chmod 777, you are allowing RWX (read, write, execute) access to owners, groups,chmod(string $filename , int $permissions ): bool Attempts to change the mode of the specified file to that given in permissions.