The permissions on the file are how the operating system determines what access to grant to a given user. 0777 is an explicit statement that the owner, the group and everyone else will all have full read-write-execute privileges.
You're after POSIX ACLs, which can be read with
getfacl and set with
setfacl. These come in the
acl RPM and require that the filesystem support ACLs. The normal Linux filesystems all support ACLs and, these days, should enable ACL support in the filesystem metadata.
The best check for whether ACL support is available is just to try to set an ACL on a file.
$ sudo yum install acl
$ setfacl -m user:fred:rwx my_file
This will grant fred rwx (07) permissions on
my_file without affecting anyone else.
Be careful to not tie yourself in knots with ACLs. They're powerful, but best used sparingly. It's normally better to create a new group.