1

I have a folder which I wish to copy from my Macbook Air (OSX 10.10.5) onto a USB attached hard disk. When I try to copy the folder, some files are copied, then the copy aborts with the message: The operation can’t be completed because you don’t have permission to access “PT3 Summary and Comments SM358 TMA01.htm”. If I just copy that file alone, I am asked to enter my password, and then the file is copied successfully.

The permissions for (me) are read/write for the file, and for the source and target folders. Any idea why I can't copy the whole folder?

3

This problem may occur because of wrong ownership. Try to run following command to change ownership for your user:

sudo chown -R $(id -un):$(id -gn) path_to_your_directory

In this example, sudo will give you needed permissions to perform operation, chown is a command to change ownership, -R will make operation recursive against target folder, $(id -un) is your current user name $(id -gn) is your current group name, path_to_your_directory shold be a path to folder you want to fix ownership.

  • Unless an ACL interferes. I have seen Time Machine in a file restore improperly copy the ACLs from the backup. I've even seen it put ACLs on the parent directory of the destination. – WGroleau Jul 11 '17 at 12:55
  • toma, thanks. And an apology: I'm not very familiar with Stack, and in attempting to post this I got confused by the presence of WGroleau's comment and pressed the 'vote' arrows thinking I was moving up or down the thread, so I voted your answer up twice and down once. :-( Before I apply your recommended procedure, can I find out who the owner currently is? That might help me to understand how the problem arose. – Nigel Martin Jul 12 '17 at 10:34
  • @NigelMartin you can type ls -l path_to_problem_file to see who is owner. – toma Jul 12 '17 at 10:52
  • The owner appears to be me, so I think that WGroleau's comment about ACL may be the problem. I think the need to copy the file is not great enough to chase this further. Thanks. – Nigel Martin Jul 19 '17 at 15:47

You must log in to answer this question.

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