File Upload directory permissions

I am uploading files with the paperclip plugin. I have a /public/photos directory which is a symlink to /home/username/public_html/example.com/shared/system/photos. I have entered the following command, in an attempt to set the permissions on that directory: sudo chmod -R 2750 /home/username/public_html/example.com/shared/system/photos

However, when I upload a new photo, the permissions on the folder holding the files, and the files themselves, are all 777.

Am I doing something wrong with setting the permissions with that directory, or is this something with paperclip?