Sorry for any confusion. I run an Apache web server on my local iMac and do all my development here before uploading to my host.
My Perl script copies an epub from my Desktop to a local directory for testing the local web site. This is where I'm running into problems.
The commands I'm using are:
my @sys=("cp", "-R", "-i", "/Users/user/Desktop/$FileName", "/Volumes/Backup3/httpd/public/local/fiction/data/$Author/$FileName");
system(@sys) == 0 or die "system cp failed: $?";
When I access the library web site, it shows me list of recent files which are clickable. Previously I could click a file (in Safari), and it would download fine. But now it's throwing an error:
'Forbidden. You don't have permission to access /fiction/data/Baldacci,David/Saving Faith.epub/ on this server.'
This is where 'ls' tells me that file is a directory, not a file.
Comment on Re^2: copy an epub as a file, not a directory
First, you should not be giving cp the -R flag if you are intending to copy files rather than directories.
Second, now we know that we are looking at a Macintosh... Classic MacOS files had both data and resource forks. In MacOS X, most of the system plays games where a "file" can actually be a directory in the underlying *nix environment to emulate the classic resource fork. Long story short, are you sure that the "files" on your desktop are actually files?