[support] SOLVED moving site and retaining permission

adept techlists - kazar techlists at ade.pt
Wed Jun 22 10:09:56 UTC 2011


I just tried this suggestion using:

cp -a public_html/ public_html/sandbox
cp: cannot copy a directory, `public_html/', into itself, 
`public_html/sandbox/public_html'

(since sandbox is a subdomain i use for testing it is actually within 
the public_html folder)

according to 
http://www.freebsd.org/cgi/man.cgi?query=cp&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html:

also tried adding the -R switch:

cp -Ra public_html/ public_html/sandbox/
cp: cannot copy a directory, `public_html/', into itself, 
`public_html/sandbox/public_html'


what am I doing wrong?

thanks

kazar

> 	Matthias Fechner <mailto:idefix at fechner.net>
> June 14, 2011 7:01 AM
>
>
> Hi,
>
> why not use:
> cp -a <old-dir> <new-dir>
>
> See here for manual page:
> http://www.freebsd.org/cgi/man.cgi?query=cp&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html
>
> Bye
> Matthias
>
> ------------------------------------------------------------------------
>
> 	adept techlists - kazar <mailto:techlists at ade.pt>
> June 14, 2011 5:24 AM
>
>
> found the solution after a bit more web-fishing.
>
> To *copy* drupal files from one directory to another directory on the
> same server while preserving permissions:
>
> Starting from the source directory:
>
> find . -depth -print | cpio -pdlmv [newdir]
>
>
> :-)
>
> soooooo much faster than the silly zip/DL/UL/unzip rigamarole i'd been
> trying to do
>
>
> kazar
> ------------------------------------------------------------------------
>
> 	adept techlists - kazar <mailto:techlists at ade.pt>
> June 12, 2011 1:33 AM
>
>
> HI all --
>
> I am singlehandedly building my first full-blown drupal site (using 7),
> rolling it out (for an art project that's already live), and testing
> additional modules and blocks etc.
>
> On the web server I have created a protected "sandbox" subdomain as my
> "test server". I am trying to find the easiest way to move the test
> files to the "production server" (i.e., out of the subdomain and into
> the TLD), and to move files back when I want to do more testing &
> development but using all the latest settings etc from the live site as
> my starting point.
>
> I have tried simple download/upload via ftp -- permissions all get
> screwed on the sites/defaults/files/xxx path
>
> I have tried gzip, download, upload tar -- the "sites" directory ends up
> empty
>
> it's a major drag to have to go into an ssh session to do chowns &
> chmods every time i move stuff back and forth.
>
> There must be an easier way.
>
> If the easier way involves straight CLI please be gentle, CLI still
> freaks me out
>
> thanks!
>
> kazar
>
>
> ------------------------------------------------------------------------



More information about the support mailing list