> > >Does anyone know how to control the umask of 'put' files in FTP server?
> > >I always get rw-rw-r-- when I log on my FTP server and put files in any
> > >directory
> > >that I have write permission.
> On an HP with 9.x or 10.x you can edit /etc/inetd.conf and put the
> protection mask in on the ftpd line. Of course you will need to re-start
> the inetd daemon.
From the Solaris FAQ:
3.48) How can I prevent daemons from creating mode 666 files?
By default, all daemons inherit the umask 0 from init.
This is most problematic for a service like ftp, which in a
standard configuration leaves all uploaded files with mode 666.
To get daemons to use another umask execute the following
commands in /bin/sh and reboot:
umask 022 # make sure umask.sh gets created with the proper mode
echo "umask 022" > /etc/init.d/umask.sh
for d in /etc/rc?.d
do
ln /etc/init.d/umask.sh $d/S00umask.sh
done
Note: the trailing ".sh" of the scriptname is important, if
you don't specify it, the script will will be executed in a
sub-shell, not in the main shell that executes all other scripts.