chmod 777chmod(string $filename , int $permissions ): bool Attempts to change the mode of the specified file to that given in permissions.You can type chmod 777, leave a space after it, and then drag the file or folder from Finder into Terminal. Terminal will fill in the correct path for you.