sending commands to a shell

From: Alistair Steger-Lewis (al_at_steger-lewis.net)
Date: 03/15/04


Date: Mon, 15 Mar 2004 18:53:44 +0000

I need to have a perl cgi script move files from the machine it is running
on to a mounted server volume. This is complicated by the fact that the
files are images with resource forks (on MacOSX) and the destination is a
windows machine. As they are mac files I need to use ditto, but the line

system "ditto", "--rsrc", "/source/file/path", "/destination/file/path";

although it executes without an error, does nothing. The httpd error log
reports

ditto: /destination/file/path: Operation not permitted

File and directory permissions are all wide open and if I execute the
command from the command line it works perfectly.

Can anyone help me? Or any other ways in perl to transfer files from one
machine to another while preserving resource forks?

TIA,

Alistair