| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Copy files from one account to another on same server|
via SSH the best way?
Hello, I need to copy 3,000+ files from one account to another account. The accounts are on the same server. Is doing this via SSH the best way? What command do I use to achieve this?
If you use a host, just get them to do it for you.
I've got an unmanaged dedicated server. I can get someone to do this, but would also like to learn how.
cp is the copy command. At the secure shell (SSH) prompt you can type "man cp" to learn more about the command.
A caveat, if you're moving, for example, a demo from one location to another, or one client to another, you will also need to change ownership of those files.
Client's a's website is accessed via client_a, which is also the user/FTP client name client_a.
You move all of client_a's files to the domain of client_b.
client_a still "owns" these files, so client_b can't FTP over or modify them. You need to CHOWN all files and directories to client_b.
Furthermore, if you perform the cp command as root, the owner of client_b's files now becomes root. Again, you need to change ownership to the new client.
Thanks coops and rockn.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved