I followed this guide { http://john.parnefjord.se/node/62 } to setup another user (joeuser) in the www-data group, but the unmask isn't being set in spite of these changes. The folder under /var/www/example.com/ is now owned by www-data group, but only www-data user can modify it. I have followed and re-followed every step mentioned in that howto.
I uncommented the echo statement in the below script:
#!/bin/bash
#/bin/echo `/bin/date` > /tmp/sftp-test.txt
#/bin/echo 'Starting SFTP server from wrapper script to set correct umask...' >> /tmp/sftp-test.txt
umask 0002;
/usr/lib/openssh/sftp-server
But nothing is being echoed / logged. I guess that means the script isn't being run. Now how can I trace what's happening when joeuser is logging in? The server is running Ubuntu 11.4.