That command will change permissions to anything inside /var/www/html/mysite
to read, write, execute for owner, group and others. You basically void all form of security.
In case anyone from the outside world gets access to your system they can do anything with these files. Including deleting them.
By the way: I consider this also bad for a development server.
- how are you suppose to decide if some script will work on an active server. It might be that the "777" on the development server make it seem like something is working properly but it is not.
- what do you do when stuff needs to go live? Check every file for proper permissions?
- at some point you will find that the active server acts differently and you will decide to use a "chmod 777" on your active server. Opening a can of worms.
For a correct working website the permissions can be set (and reset) with these 2 commands:
find /var/www/html/mysite -type d -exec chmod 755 {} \;
find /var/www/html/mysite -type f -exec chmod 644 {} \;