From: "David Gillard" <dgillard@xxxxxxxxxxxxx> Date: Thu, 10 Jan 2002 13:54:25 -0000 We are having some problems with ftp on one of our Raq 4 Servers. Our clients are uploading files to the server, but are not getting group write permission - files are being uploaded 644. We wanted to change this to 664, we checked the value of UMASK in /etc/proftpd.conf - 002. We have tried setting this in a .profile file restarting the server but without luck. Any other ideas where we should be looking.
I saw this and several other similar messages in the archives, but I couldn't find the resolution. For the sake of completeness, having corresponded with David and having pondered this very question for many months, I now post a working solution.
As David realized, you should be able to set a Umask directive of 002 in the global section or even at the top of your /etc/proftpd.conf to obtain file permissions of -rw-rw-r--. Unfortunately, this doesn't work (although I didn't figure out why).
One valid workaround is the following (courtesy of David):For each VirtualHost directive in your file (or for each you want to have files uploaded as group-writeable), add the following line:
Umask 002 A valid VirtualHost entry would then look something like this: <VirtualHost 216.123.45.67> Umask 002 DefaultRoot / admin DefaultRoot ~/../.. site-adm DefaultRoot ~ !site-adm AllowOverwrite on DisplayLogin .ftphelp </VirtualHost>These changes need to be made to your /etc/proftpd.conf file as root, using your favourite text editor (vi/pico, whatever). You do not need to restart anything after making the changes. The changes will be valid the next time you open an FTP connection to the virtual site.
By the way, if you also need dot files to be shown, you can add that directive into each virtual site. It should be:
ShowDotFiles on Michelle