You probably want
chown -hR userB:users /home/userB
(you may be able to get away with it using -f -- otherwise, add that user to /etc/passwd)
If you want to copy a file hierarchy (i.e., a directory and all subdirectories)
, you need to use the -r option:
cp -r target destination
chown -hR userB:users /home/userB
(you may be able to get away with it using -f -- otherwise, add that user to /etc/passwd)
If you want to copy a file hierarchy (i.e., a directory and all subdirectories)
, you need to use the -r option:
cp -r target destination