Subject: The upload command in ftpaccess file

From: Ralph Lewis <[email-masked]>
Date: Tue, 07 Mar 1995 11:27:28 -0800 (PST)

I seem to be having some difficulty with getting the upload 
command in the ftpaccess file to work properly.  I have this:

upload  /Second/Users/ftp  *       no
upload  /Second/Users/ftp  /incoming  yes  root  wheel  0600  nodirs   

	But I can make directories and the file ownership and bits aren't 
right either.

Also as a side note, I'm using the O'Reilly "Managing Internet 
Information Services" (which has helped greatly) but I think it might 
have a typo.  When it gives an example of the path-filter command it sez 
"path-filter anonymous /path/message ^[-A-Za-z0-9._]*$ ^. ^- "  I think 
this should have the " ^. " read " ^/. ".  Otherwise you can't even 
upload any file. 

	Thanx for all of the help....

____________________________   ____________________________________________
Ralph Lewis		    \ /	I'm a 21st Century digital boy
WSU Information Technology  -O-	I don't know how to read, but I got a lot 
[email-masked]   / \	  toys. 	-Bad Religion

---

From: [email-masked] (Bob Parks)
Date: Tue, 07 Mar 1995 15:01:13 -0600 (CST)

I have a hanging all-the-time ftpd so I tried the fix:
The new code is:

-----
   if (pdata >= 0) {
	struct sockaddr_in from;
	int s,
	  fromlen = sizeof(from);

 #ifdef FD_ZERO
       struct timeval timeout;
       fd_set set;

       FD_ZERO(&set);
       FD_SET(pdata, &set);

       timeout.tv_usec = 0;
       timeout.tv_sec = 120;

 if (select(pdata+1, &set, (fd_set *) 0, (fd_set *) 0, &timeout) == 0 ||
    (s = accept(pdata, (struct sockaddr *) &from, &fromlen)) < 0) {
 #else
	 s = accept(pdata, (struct sockaddr *) &from, &fromlen);
	 if (s < 0) {
 #endif
	    reply(425, "Can't open data connection.");
	    (void) close(pdata);
	    pdata = -1;
	    return (NULL);
	}
----
taken a few lines above and a few lines below the mod.

The build complains: (Sun 4.1.3)

Making ftpd.
gcc -g -DDEBUG -I.. -I../support -L../support  -target sun4 -c  ftpd.c
ftpd.c: In function `dataconn':
ftpd.c:1711: storage size of `timeout' isn't known
*** Error code 1
make: Fatal error: Command failed for target `ftpd.o'

and at line 159 I have
int timeout = 900;

Any help appreciated.

*--------------------------------------------------------------------------*
| Bob Parks                                          Voice: (314) 935-5665 |
| Department of Economics, Campus Box 1208             Fax: (314) 935-4156 |
| Washington University                                                    |
| One Brookings Drive                                                      |
| St. Louis, Missouri 63130-4899                   [email-masked]|
*--------------------------------------------------------------------------*

---

From: Casper Dik <[email-masked]>
Date: Tue, 07 Mar 1995 23:06:08 +0100

>I have a hanging all-the-time ftpd so I tried the fix:

You need to include <sys/time.h> which defines the struct timeval.

Casper

---

From: [email-masked] (Patrick Salsbury)
Date: Tue, 07 Mar 1995 14:02:54 -0800 (PST)

-Errors-To: [email-masked]
-Date: Tue, 07 Mar 1995 11:27:28 -0800 (PST)
-From: Ralph Lewis <[email-masked]>
-Errors-To: [email-masked]
-Reply-To: [email-masked]
-Mime-Version: 1.0
-Content-Type: TEXT/PLAIN; charset=US-ASCII
-Content-Transfer-Encoding: 7BIT
-
-
-	I seem to be having some difficulty with getting the upload 
-command in the ftpaccess file to work properly.  I have this:
-
-upload  /Second/Users/ftp  *       no
-upload  /Second/Users/ftp  /incoming  yes  root  wheel  0600  nodirs   
-
-	But I can make directories and the file ownership and bits aren't 
-right either.
-
	Maybe flip those lines? I know several other things in the access file
read top-down, so it may see the "no" first off, and just stop. If you flip
'em, it should see the /incoming as a yes, and everything else as a no.

	Not positive, but that'd be my guess...

Pat
-------------------------------------------------------------------------------
	  Patrick Salsbury 	                IXI/Visionware           
	Sys Admin/Webmaster             4500 Bohannon Dr., Suite #280  
	Voice: 415/325-2113	             Menlo Park, CA 94025      
	 FAX: 415/325-8710	      X/UNIX/PC Integration Specialists

---

From: Vidiot <[email-masked]>
Date: Tue, 07 Mar 1995 16:52:57 -0600 (CST)

<
<I have a hanging all-the-time ftpd so I tried the fix:
<The new code is:
<
<-----
<   if (pdata >= 0) {
<	struct sockaddr_in from;
<	int s,
<	  fromlen = sizeof(from);
<
< #ifdef FD_ZERO
<       struct timeval timeout;
<       fd_set set;
<
<       FD_ZERO(&set);
<       FD_SET(pdata, &set);
<
<       timeout.tv_usec = 0;
<       timeout.tv_sec = 120;
<
< if (select(pdata+1, &set, (fd_set *) 0, (fd_set *) 0, &timeout) == 0 ||
<    (s = accept(pdata, (struct sockaddr *) &from, &fromlen)) < 0) {
< #else
<	 s = accept(pdata, (struct sockaddr *) &from, &fromlen);
<	 if (s < 0) {
< #endif
<	    reply(425, "Can't open data connection.");
<	    (void) close(pdata);
<	    pdata = -1;
<	    return (NULL);
<	}
<----
<taken a few lines above and a few lines below the mod.
<
<The build complains: (Sun 4.1.3)
<
<Making ftpd.
<gcc -g -DDEBUG -I.. -I../support -L../support  -target sun4 -c  ftpd.c
<ftpd.c: In function `dataconn':
<ftpd.c:1711: storage size of `timeout' isn't known
<*** Error code 1
<make: Fatal error: Command failed for target `ftpd.o'
<
<
<and at line 159 I have
<int timeout = 900;

What version of gcc are you using?  The above code compiles just fine on
my SunOS 4.1.3_U1 rev B system.  I am using GCC 2.6.0.

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: [email-masked]
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - http://www.ftms.com/vidiot/  (Your link to the world of Star Trek)

---

From: Vidiot <[email-masked]>
Date: Tue, 07 Mar 1995 17:15:41 -0600 (CST)

Casper:

<>I have a hanging all-the-time ftpd so I tried the fix:
<>The new code is:
<
<You need to include <sys/time.h> which defines the struct timeval.

Excuse me for being dumb, but what does the struct timeval have to do with
timeout?  Timeout isn't even in the structure.

I assumed that the change from <time.h> to <sys/time.h> was also done, since
that change was part of the patch file.  I suppose I should have asked about
that, but didn't since I didn't find anything to do with timeout in sys/time.h.

MB