When I use -p to preserve the file permissions of a file being copied, does it apply to the source or the destination file (if it already exists)?
Thanks
It's preserves the source file's attributes (mode, ownership, and timestamps) in the destination. (Provided the destination file system supports it.)
If a file already exists it will be overwritten with the source and it's attributes, unless you've combined the -i flag.