[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configuring ftpd for upload
On Sun, 3 Sep 2000, Saad KADHI wrote:
> The ideal would be something like:
> all users can upload sth in the incoming directory
> all users might see what's in this directory
> NOBODY can delete what's in this directory apart from root who might moves
> files from incoming to pub.
I had similar needs so I patched ftpd. The patch (attached to this mail)
adds -R that disables the DELE, RMD, RNFR and RNTO commands
Anyone using it does so on their own risk. I haven't double checked for
unexpected side effects.
Andreas
--
Andreas Gunnarsson <andreas@crt.se>
Carlstedt Research & Technology
Phone: +46 31 7014268
Mobile: +46 70 4262889
Fax: +46 31 101987
? ftpd.cat8
Index: ftpd.c
===================================================================
RCS file: /cvs/src/libexec/ftpd/ftpd.c,v
retrieving revision 1.77
diff -r1.77 ftpd.c
183a184
> int allowdelete = 1; /* allow user to delete files */
278c279
< char *argstr = "AdDhlMSt:T:u:UvP46";
---
> char *argstr = "AdDhlMRSt:T:u:UvP46";
330a332,335
> case 'R':
> allowdelete = 0;
> break;
>
1881a1887,1890
> if (!allowdelete) {
> reply(550, "Permission denied.");
> return;
> }
1958a1968,1971
> if (!allowdelete) {
> reply(550, "Permission denied.");
> return;
> }
1981a1995,1999
> LOGCMD("renamefrom", name);
> if (!allowdelete) {
> reply(550, "Permission denied.");
> return;
> }
1995a2014,2017
> if (!allowdelete) {
> reply(550, "Permission denied.");
> return;
> }