2

When I copy files from my osx disk to an external SSD drive, for some reason all the permission bits are set to 1. Is there a reason why and a way to preserve the original permissions? I did this with bash so not sure if there is a flag that I forget to put.

$ ls -l ~/test.txt
-rw-r--r--@ 1 bzon  staff   1.0G Aug 29  2017 test.txt
$ cp ~/test.txt /Volumes/SSD/test.txt
$ ls -l /Volumes/SSD/test.txt
-rwxrwxrwx@ 1 bzon  staff   1.0G Jan  5 20:28 /Volumes/SSD/test.txt
1
  • 2
    What is the target filesystem? If it was NTFS in Linux then I would point to this, this and this. I don't know macOS but it may be similar. Commented Jan 6, 2021 at 8:15

1 Answer 1

2

For copying files between compatible filesystem types, try using cp -a SOURCE DEST . The a options stands for archive, which preserves permissions, file ownership & other meta data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .