>I'm trying to configure the permissions of a file put on a Solaris 2.4
>machine through FTP.
>All the files I'm uploading on the machine through FTP have permissions
>-rw-rw-rw-. I would like to change this 'default' value or have it read
>the umask in /etc/profile.
Not really, but you can try:
The solaris FAQ says:
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.
--- end of excerpt from the FAQ
Questions marked with a * or + have been changed or added since
the FAQ was last posted
The most recently posted version of the FAQ is available from
ftp.fwi.uva.nl in directory /pub/solaris
--
Casper Dik - Network Security Engineer - Sun Microsystems
This article is posted from my guest account at the University
Opinions expressed here are mine (but you're welcome to share them with me)