From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,84fd033ae2d68619,start X-Google-Attributes: gid10952f,public X-Google-Thread: fee84,84fd033ae2d68619,start X-Google-Attributes: gidfee84,public From: Eric Bennett Subject: Security concerns over local wu-ftpd setup. Date: 1995/11/17 Message-ID: #1/1 X-Deja-AN: 119574201 cc: Linda May , Michael Santangelo content-type: TEXT/PLAIN; charset=US-ASCII organization: University of Maryland, Chesapeake Biological Lab. mime-version: 1.0 newsgroups: comp.security.unix,comp.unix.osf.osf1 I've configured anonymous ftp using wu-ftpd for my site. I have two remaining questions, one general, one specific: The way I set it up is a little too slick for my taste. I _think_ my security bases are all covered in this setup, but I'm too paranoid to accept that. Have I overlooked something in the following configuration? How do I set the UMASK for anon ftp users? It is now 022, but I want 002 so that created subdirectories can be cleaned up by Joe LocalUser too. - - - Goals for Anonymous FTP security: 1) Anon users be able to leave files in an incoming directory 2) That they be able to see those files, but not fetch them 3) Local users be able to delete those files 4) Anon FTPers not be able to get a list of local uids File permissions in my ftp directory: drwxrwxr-x 8 root archive 512 Nov 16 17:40 ./ dr-xr-xr-x 2 root system 512 Nov 17 00:13 bin/ ---s--x--- 1 bin ftp 409600 Jun 16 15:30 bin/ls* dr-xr-xr-x 4 root system 512 Nov 17 00:13 etc/ ----r--r-- 1 ftp system 57 Nov 16 17:41 etc/group ----r--r-- 1 ftp system 6755 Nov 17 00:13 etc/passwd drwxrwxr-x 2 ftp users 512 Nov 17 01:48 incoming/ -rw-r--r-- 1 root system 38 Nov 16 16:48 incoming/README So that our UIDs can't be seen by an anonymous ftp user, I 1) created a passwd file which has our users in it (unneeded stuff filtered out, of course) 2) set it owner/mode ftp.system/0044, so user ftp can't read it 3) set /bin/ls to bin.ftp/4110, setuid so that it can access passwd as bin, and group readable so that local users can't use this ls to peek at bin's files elsewhere (some of which are sensitive) 4) turned off chmod in /usr/local/etc/ftpaccess so user ftp can't change the mode of the passwd file. So that incoming files can't be seen by ftp users 1) Made /incoming dir ftp.users/0775 so that ftp user and regular user can create and delete files. 2) Set uploaded files to ftp.users/0064 in ftpaccess, so that ftp can't see the contents and so users can delete the file. 3) turned off chmod so anon user can't change mode 4) turned off umask for anon user in the hope that I'll find out how to set the umask to 002 for new directories. Have I missed anything? It's seems to work the way I want, but that doesn't imply much. I'll summarize your responses if it seems worth it. Thanks for reading this far! Eric B.