Subject: group ownership of put files is wrong

From: [email-masked]
Date: Fri, 11 Aug 95 14:49:33 +0000

Hi,

I'm running wu-ftp on an IBM RS/6000, AIX 3.2.5.  I have some real accounts
and some guest accounts set up.  In either case, when a user ftps to my 
machine and puts a file, the group owner of the file is system, not the primary 
group of the ftp user's account.  This of course causes problems, because
I wanted to set up groups so that certain users could put files in certain
directories,but now each directory has to have group write for system.  Any 
ideas of what I've done wrong?

My ftpaccess looks like:

loginfails 5

class   all guest *
class   test real *

guestgroup iws guest

banner /usr/local/etc/ftpbanner

log commands guest
log transfers guest inbound,outbound

# all the following default to "yes" for everybody
delete          yes     guest  # delete permission?
overwrite       yes     guest  # overwrite permission?
rename          yes     guest  # rename permission?
chmod           no      guest  # chmod permission?
umask           no      guest  # umask permission?

Thanks,
Kim Tolbert

---

From: [email-masked]
Date: Fri, 11 Aug 95 15:35:05 +0000

Thanks Shane,

Unfortunately the patch didn't work.
Now I get the error message:
550 Can't set gid (AIX3).
Login failed.

Any other ideas?

Thanks, Kim Tolbert

----------------------------------------------------
RE:

My ftpaccess looks like:

loginfails 5

class   all guest *
class   test real *

guestgroup iws guest5

log commands guest

Thanks,
Kim Tolbert

Apply this patch to ftpd.c:

--- ./src/ftpd.c.dist   Wed Apr 13 15:17:18 1994
+++ ./src/ftpd.c        Fri Apr 15 08:33:55 1994
@@ -1153,7 +1153,12 @@
        setgroups(NULL, NULL);
        if (setpriv(PRIV_SET|PRIV_INHERITED|PRIV_EFFECTIVE|PRIV_BEQUEATH,
                    &priv, sizeof(priv_t)) < 0 ||
-           setuidx(ID_REAL|ID_EFFECTIVE, (uid_t)pw->pw_uid) < 0 ||
+           setgidx(ID_REAL|ID_EFFECTIVE, (gid_t)pw->pw_gid) < 0 ||
+           setegid((gid_t)pw->pw_gid) < 0) {
+               reply(550, "Can't set gid (AIX3).");
+               goto bad;
+       }
+       if (setuidx(ID_REAL|ID_EFFECTIVE, (uid_t)pw->pw_uid) < 0 ||
            seteuid((uid_t)pw->pw_uid) < 0) {
                reply(550, "Can't set uid (AIX3).");
                goto bad;

Shane Castle             | "Perfection, then, is finally achieved, not
Boulder County Info Svcs | when there is nothing left to add, but when
Boulder CO USA           | there is nothing left to take away."
                         |                - Antoine de Saint-Exupery

---

From: [email-masked] (Noam Paz)
Date: Mon, 14 Aug 1995 16:41:27 +0200

Hi Kim,
what are the permissions on the directory(ies) in which the files are written ?
Is the SGID bit set ?
Noam