To be honest I spent like 30 mins trying to figure out how to select SFTP! I went through every options window except the first one... But have now tried it. YES it fixes the problem, thanks. Will do some testing and see how it performs, it seems to have a few problems when you try to do things without permissions - see the log below it might interest you.
I would actually quite like to continue using SCP as I know it works nicely. We can forget about the set permissions thing anyway because my problem would also be solved by providing a way to set the setgid bit, for example let us use numeric permissions and then I would have no problem (I would use 2775). Do you think you could please provide this feature at some stage?
--------------------
Log from an SFTP session FYI
. Deleting file "temptest".
. Listing directory "/var/www/html/www4/temptest".
> Type: SSH_FXP_OPENDIR, Size: 36, Number: 18955
< Type: SSH_FXP_HANDLE, Size: 13, Number: 18955
> Type: SSH_FXP_READDIR, Size: 13, Number: 19212
< Type: SSH_FXP_STATUS, Size: 28, Number: 19212
. Listing file "temptest/..".
> Type: SSH_FXP_LSTAT, Size: 39, Number: 19463
< Type: SSH_FXP_STATUS, Size: 34, Number: 19463
. Error status: 3, Message: 19463, Server: Permission denied, Language: ?
> Type: SSH_FXP_CLOSE, Size: 13, Number: 19716
< Type: SSH_FXP_STATUS, Size: 24, Number: 19716
. Asking user:
. Error listing directory "temptest". ("Server returned empty listing for directory 'temptest'.")
. Getting current directory name.
. Listing directory "/var/www/html/www4".
> Type: SSH_FXP_OPENDIR, Size: 27, Number: 19979
< Type: SSH_FXP_HANDLE, Size: 13, Number: 19979
> Type: SSH_FXP_READDIR, Size: 13, Number: 20236
< Type: SSH_FXP_NAME, Size: 3957, Number: 20236
> Type: SSH_FXP_READDIR, Size: 13, Number: 20492
< Type: SSH_FXP_STATUS, Size: 28, Number: 20492
> Type: SSH_FXP_CLOSE, Size: 13, Number: 20740
< Type: SSH_FXP_STATUS, Size: 24, Number: 20740
. Copying 1 files/directories to remote directory "/var/www/html/www4/"
. PrTime: No; PrRO: No; Rght: ----w-r-x; PrR: Yes; FnCs: N; Resume: S (512000)
. TM: M; AscM: *.*htm*; *.txt; *.php*; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex
. File: "C:\Documents and Settings\Fletch\My Documents\temptest"
> Type: SSH_FXP_OPENDIR, Size: 37, Number: 21003
< Type: SSH_FXP_STATUS, Size: 29, Number: 21003
. Error status: 2, Message: 21003, Server: No such file, Language: ?
. Creating directory "/var/www/html/www4/temptest/".
> Type: SSH_FXP_REALPATH, Size: 37, Number: 21520
< Type: SSH_FXP_STATUS, Size: 29, Number: 21520
. Error status: 2, Message: 21520, Server: No such file, Language: ?
> Type: SSH_FXP_REALPATH, Size: 36, Number: 21776
< Type: SSH_FXP_STATUS, Size: 29, Number: 21776
. Error status: 2, Message: 21776, Server: No such file, Language: ?
> Type: SSH_FXP_MKDIR, Size: 45, Number: 21262
< Type: SSH_FXP_STATUS, Size: 24, Number: 21262
. Listing directory "/var/www/html/www4".
> Type: SSH_FXP_OPENDIR, Size: 27, Number: 22027
< Type: SSH_FXP_HANDLE, Size: 13, Number: 22027
> Type: SSH_FXP_READDIR, Size: 13, Number: 22284
< Type: SSH_FXP_NAME, Size: 4072, Number: 22284
> Type: SSH_FXP_READDIR, Size: 13, Number: 22540
< Type: SSH_FXP_STATUS, Size: 28, Number: 22540
> Type: SSH_FXP_CLOSE, Size: 13, Number: 22788
< Type: SSH_FXP_STATUS, Size: 24, Number: 22788
. Deleting file "temptest".
. Listing directory "/var/www/html/www4/temptest".
> Type: SSH_FXP_OPENDIR, Size: 36, Number: 23051
< Type: SSH_FXP_STATUS, Size: 34, Number: 23051
. Error status: 3, Message: 23051, Server: Permission denied, Language: ?
. Asking user:
. Error listing directory "temptest". ("Permission denied.
. Error code: 3
. Error message from server: Permission denied (?)
. Request code: 11")
. Asking user:
. Error deleting file 'temptest'. (EAccessViolation)
. Listing directory "/var/www/html/www4".
> Type: SSH_FXP_OPENDIR, Size: 27, Number: 23307
< Type: SSH_FXP_HANDLE, Size: 13, Number: 23307
> Type: SSH_FXP_READDIR, Size: 13, Number: 23564
< Type: SSH_FXP_NAME, Size: 4072, Number: 23564
> Type: SSH_FXP_READDIR, Size: 13, Number: 23820
< Type: SSH_FXP_STATUS, Size: 28, Number: 23820
> Type: SSH_FXP_CLOSE, Size: 13, Number: 24068
< Type: SSH_FXP_STATUS, Size: 24, Number: 24068
. Getting current directory name.
. Listing directory "/var/www/html/www4".
> Type: SSH_FXP_OPENDIR, Size: 27, Number: 24331
< Type: SSH_FXP_HANDLE, Size: 13, Number: 24331
> Type: SSH_FXP_READDIR, Size: 13, Number: 24588
* (EAccessViolation) Access violation at address 0050FB97 in module 'WinSCP3.exe'. Read of address 203A4F4E
* (EAccessViolation) Access violation at address 0050FB97 in module 'WinSCP3.exe'. Read of address 203A4F4E
* (EAccessViolation) Access violation at address 0050FB97 in module 'WinSCP3.exe'. Read of address 203A4F4E
---------------------
WinSCP then died