After more research it seems like another (possibly better way) to answer this would be to setup the www folder like so.
sudo usermod -a -G developer user1
(add each user to developer group)
sudo chgrp -R developer /var/www/site.com/
so that developers can work in there
sudo chmod -R 2774 /var/www/site.com/
so that only developers can create/edit files (other/world can read)
sudo chgrp -R www-data /var/www/site.com/uploads
so that www-data (apache/nginx) can create uploads.
Since git
runs as whatever user is calling it, then as long as the user is in the "developer" group they should be able to create folders, edit PHP files, and manage the git repository.
Note: In step (3): '2' in 2774 means to 'set Group ID' for the directory. This causes new files and sub directories created within it to inherit the group ID of the parent directory (instead of the primary group of the user) Reference: http://en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories
You definitely want a group for this. I would configure a group for FTP access. Put the users in a group that you want to use for FTP users, and then I suggest the following (assuming the FTP group is called FTP and the base data directory is /ftpdata - change these as needed):
chown -R nobody:ftp /ftpdata
find /ftpdata -type f -exec chmod 664 {} \;
find /ftpdata -type d -exec chmod 2775 {} \;
Here's what you're doing...
chown -R nobody:ftp /ftpdata
This sets the owner to nobody and the group to ftp for every file and directory below /ftpdata.
find /ftpdata -type f -exec chmod 664 {} \;
This command sets every file below /ftpdata to be mode 664, that is read-write for the owner and group, and read-only for everyone else.
find /ftpdata -type d -exec chmod 2775 {} \;
This command sets every directory below /ftpdata to 2775, that is read-write-and-execute for the owner and group, and read-execute for the world, plus any new files created in any of those directories will be owned by the ftp group.
The 2 in 2775 is "Set Group ID" - whenever a new file is created in a directory with that bit set, it makes the group of that file the same as the group that owns the directory. Without that, a user who's primary group is not the ftp group will create files that are owned by another group, and may not be accessible by other members of the group.
Best Answer
As Tilman stated the 3907 is file size. The permissions are shown as -rw-------.
This case rw- --- --- would be I believe 600 in permissions. Which would be file owner can read and write it. Groups and Other can not do anything.
You can read up a bit here, seems to be a nice little break down of it:
https://ss64.com/bash/chmod.html