My Script Needs to Use 777 Permissions
Please try to set the directory to 0755 instead (drwxr-xr-x). This will enable read-execute, but not write access for group and world.
Why Can't I Use 777 Permissions?
777 permissions on folders and files is a website security risk, so we do not allow you to have them.Most hosting companies now use suPHP servers, thus 755 will allow PHP to read, write and execute scripts just like 777 does. Because of this, most scripts work when you use 755.
Note: Symbolic links (Such as the www and access-logs directories in your home directory), otherwise known as symlinks, will appear to have 777 permissions, but will actually only have the permissions of the file or directory they point to.
When looked at in your file manager, however, it will show 777 permissions because their own permissions cannot be changed directly, and attempting to do so will only modify the file that they reference.