I followed the answer to this question for setting default file permissions in my web root folder:
I am trying to set all files/dirs to 775 by default. This works fine when creating files within linux and also when creating files directly on the web root through the samba share but it doesnt seem to work when files are created on the windows disk and ftp'd over.
When I do this the file permissions are set as read/write owner only [-rw-------] so apache cant even read them.
My setup is that Im running ubuntu in a virtualbox with a windows 7 host. I have a local directory on the host where I store the files and I ftp them to the ubuntu machine using netbeans for testing.
When I ftp to the vb I am connecting as an authenticated user (the same one that owns the web root and everything in it - who is also in the same group as apache and this is the group all the files are part of).
How can ensure that files are created with 775 permissions when ftping. (I am using vsftpd)
Thanks in advance for any suggestions
UPDATE - SOLVED
If any one else is having the same issue, I managed to solve this by editing the file .bashrc which is in the root of each users home directory (on ubuntu - I believe different set ups are used elsewhere).
Inside the file I set a umask for the ftp user by adding the line umask 002 to the bottom of the file.
This has the effect of giving all files created by the user permissions of 775.
You will need to reboot (or maybe just logout) for the changes to take effect