[sork] Problem with sork and smrsh

Craig Richardson crichard@maccs.mq.edu.au
Mon, 09 Sep 2002 14:52:03 +1000


Ok, I've tried this and got it to work but had to modify the patch slightly

I have changed the code from line 120 on to be the following, the only
important difference is the string sent to ftp_site().

if (!(@ftp_site($ftpConnection, "chmod 0600 $dst"))) {
            $this->err_str = _("Could not set forwarding!");
            @ftp_quit($ftpConnection);
        }
        @ftp_quit($ftpConnection);
        return true;
}

My problem in the end was that our wu-ftp server implements a default umask
(defumask 0002) in the /etc/ftpaccess file.  This was a fix so people
sharing files in directories with sticky bits set gave write permission to
the group as well as themselves when creating new directories.

Thanks heaps for your help everybody.

Craig


On 7/9/02 1:35 AM, "Eric Rostetter" <eric.rostetter@physics.utexas.edu>
wrote:

> For those with file permission problems, there is no good solution.  There
> is no standard ftp chmod() type call.  So the best we can do is to try using
> the ftp site command, and hope for the best.  Can those having problems try
> this patch and see if it works?  Let me know if you try it, and what the
> outcome is.  The patch is to cvs RELENG_2, but should be easy to implement
> in any version (just adds one line of code).
> 
> Patch can be found at
> https://mail.ph.utexas.edu/patches/misc/vacation.php.diff
> 
> Included here, but the mailers will probably mutilate it, so if in doubt
> try the above url.
> 
> Index: vacation.php
> ===================================================================
> RCS file: /repository/vacation/Attic/vacation.php,v
> retrieving revision 1.3
> diff -u -r1.3 vacation.php
> --- vacation.php        30 Jun 2002 00:12:38 -0000      1.3
> +++ vacation.php        6 Sep 2002 15:30:22 -0000
> @@ -116,6 +116,7 @@
>            @ftp_quit($ftpConnection);
>            return false;
>        }
> +        @ftp_site($ftpConnection, "site chmod 0600 $dst");
>        @ftp_quit($ftpConnection);
>        return true;
> }

--
Craig Richardson, BSc
Systems Administrator
Macquarie Centre for Cognitive Science
Email : crichard@maccs.mq.edu.au
Phone: +61 2 9850 6730
Fax : +61 2 9850 6059
Office : C5A409