Attempt to copy a file denied by permissions, but why? 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?
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.