Subject: Re: Setting default upload permissions -- clarification

From: "Haralds Jass" <[email-masked]>
Date: Sat, 8 Feb 1997 16:07:50 -0800

What I mean is NOT the upload clause in the ftpaccess, but setting 
one mode for all users when they upload files to their dirs (now is 
rw-rw-r which is VERY bad security wise, should be rwx-rx-rx).

Is it possible at all? (IMO must be, as no software would have such a 
big security hole still not fixed!)

On  8 Feb 97 at 15:49, Haralds Jass wrote:

> I have searched through the wu-ftpd (2.4.2b11) docs and have not been 
> able to find anything on this...
> how do I set the default uploaded file modes to other than the 
> default? (otherwise now it has group write as well, which is very bad 
> for a multi-user system!).
> (Is this a command line option to add to inetd.conf or a compile time 
> option? How can it be set, etc?)
> 
> Thanks in advance!
> -HJ
> 

--
Haralds Jass <[email-masked]>
Superb Internet - "Ahead of the Rest."
http://www.superb.net

"I am easily satisfied by the very best"
- Winston Churchill

---

From: "Haralds Jass" <[email-masked]>
Date: Sat, 8 Feb 1997 16:46:57 -0800

On  8 Feb 97 at 18:41, Michael Brennen wrote:

> 
> See the upload directive in /etc/ftpaccess.  Make sure you are running -a
> on the wu.ftpd line in inetd.conf.
> 
> man ftpaccess
> 
>    -- Michael

As I wrote in my other message just a bit later, I was looking for 
the umask...and I did try -u for ftpd in inetd.conf, BUT
-u 755 gives:
-----w--w-
and so does -u 0755 (yes, I rebooted the server for this to take 
effect).

So what is the way to get 755 default file upload more for all users 
(when they upload files to their home dirs, etc.)? It is not the 
upload clause, nor the -u 755 for inetd.conf ftpd entry as far as I 
can see...

(I am using wu-ftpd 2.4.2b11 on Solaris 2.5.1/ISS 1.0).

---

From: "Haralds Jass" <[email-masked]>
Date: Sat, 8 Feb 1997 15:49:05 -0800

Thanks in advance!
-HJ

---

From: Michael Brennen <[email-masked]>
Date: Sat, 8 Feb 1997 18:41:16 -0600 (CST)

man ftpaccess

   -- Michael

---

From: Michael Brennen <[email-masked]>
Date: Sat, 8 Feb 1997 18:42:27 -0600 (CST)

CMASK in ftpd.c -- set it to 022.

   -- Michael

---

From: James Sneeringer <[email-masked]>
Date: Sun, 9 Feb 1997 22:51:56 -0600 (CST)

On Sat, 8 Feb 1997, Haralds Jass wrote:
| As I wrote in my other message just a bit later, I was looking for 
| the umask...and I did try -u for ftpd in inetd.conf, BUT
| -u 755 gives:
| -----w--w-
| and so does -u 0755 (yes, I rebooted the server for this to take 
| effect).

That's exactly correct.  The umask is just the opposite of the permission
bits; it defines which permissions to NOT allow upon creating new files,
devices, directories, etc.  So in this case: 

    777   -rwxrwxrwx   all permissions
  - 755   -rwxr-xr-x   subtract umask
 -------
     22   -----w--w-   resultant permissions

Thus, if you want a default of 755, set the umask to 22.

-James