SparkyLinux Forums

General => 0ther => Topic started by: seppalta on January 09, 2018, 07:41:22 PM

Title: Preserve Permissions with Copy [Solved]
Post by: seppalta on January 09, 2018, 07:41:22 PM
How can I copy a file or directory while preserving ownerships and permissions?  It appears that after a copy, the permissions always change to "nobody", regardless of what they were before and who owns the file/directory.
Title: Re: Preserve Permissions with Copy
Post by: Capitain_Jack on January 10, 2018, 12:13:11 PM
Hi there! Take a look here:
https://unix.stackexchange.com/questions/43605/how-do-i-copy-a-folder-keeping-owners-and-permissions-intact
Title: Re: Preserve Permissions with Copy [Solved]
Post by: seppalta on January 10, 2018, 10:01:51 PM
Thanks, C._Jack.  Have not had time to test, but apparently copy -pr or cp -a should work according to man cp.