chmod 760 or 777, could this be a security problem?
See man chmod for what the command does. Basically it sets access permissions on files and folders, with the three digits standing for user, group and other permissions. So the first digit defines the permissions for the user owning the file, the second for the group owning the file, the third for anybody else.

In your case


chmod 777 gives everybody read, write and execute rights which for most problems is definitively too much
chmod 760 gives all rights to the owner, read and write to the group owning the file and no rights to users which neither own the file nor are part of the owning group


Granting too many rights might be a security problem, depending on whether other people can access your computer and/or your computer is accessible from outside. 

To resolve apache/PHP issues, granting 777 seems to be rather broad. I would go with 664 (or even 660) first.