Find the answer to your Linux question:
Results 1 to 2 of 2
I have Linux VPS and few accounts there. I used SSH with root logins to copy files from one account to another (e.g. in this folder /home/firstacc/public_html/forum I typed cp ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2013
    Posts
    1

    Recursive copy files from one user account to another clear permission


    I have Linux VPS and few accounts there. I used SSH with root logins to copy files from one account to another (e.g. in this folder /home/firstacc/public_html/forum I typed cp -R * /home/secondacc/public_html/community). Now when I use regular FTP to edit files on secondacc - I can't modify it - SmartFTP says permission denied.

    So what is the best way to copy all files from one account to another, but without copying ownership/permission details (or automatically assign "destination" account as owner and assign appropriate permissions ) ?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,639
    Automatic assignment of ownership + permissions? Only if you do the operation as the target user, and the source files / directories allow you to read the files / directories. If you do this as the sysadmin (root) user, then you will need to take one more step and assign ownership of the files to the specified target user, as in:
    Code:
    find userdir -exec chown user.group {} \;
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •