4
1
I am trying to write a site deploy script that will copy files like so:
SOURCE
.
..
src/
html/
DEST
.
..
src/
html/ -> /var/www/ftproot/mysite
I want the files in SOURCE html
to go to DEST /var/www/ftproot/mysite
.
The script was:
cd SOURCE
cp -Rf * DEST
Every time I run the script, I get this error:
cp: cannot overwrite non-directory 'html' with directory `html'
From this, I deduce that cp
cannot automatically copy files into DEST when DEST has symbolic links.
Notes:
Following the cp manual, I set
POSIXLY_CORRECT
to 1. This doesn't work.I had to link site
html
toftproot/mysite
and not vice versa because the ftp users have weird access modes.This guy modified
cp
source code and recompiled it. I don't want to do that to a production server.
Any ideas on how to solve this?
@Dennis Thank you, answers are: 1. yes (start with
l
whenls -l
) 2. Ubuntu 10.04 server 3. Not safe to assume that – est – 2013-01-14T03:40:51.677@Dennis yes you are correct. I edited my post. – est – 2013-01-14T03:52:38.747