The operation can’t be completed because you don’t have permission to access some of the items

I decided to make the topic the error message, since it’s what people often are searching for when experiencing a problem :-) .

Problem scenario: You’ve downloaded a file from t3h intranetz on your Snow Leopard MacBook, and opens the file (possibly a PDF or DMG file) using the Mac. Then you try to copy the file to your SMB/CIFS network share (Samba/Synology/QNap/ReadyNAS/{your NAS device here}), but get the following dreaded and dumbfounding error message:

The operation can’t be completed because you don’t have permission to access some of the items.

The problem here, is that the file has been modified by OSX. Now, after having been tampered with by your Mac, the file contains more attributes, which you can display using the ‘xattr {file}’ command in a terminal window. A file with extended permissions might look like this:

$ xattr Pictures/Avatar/cookie-monster3-7769871237963363.jpg
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine
xattr happily tells you the file now has two extended attributes. These attributes can be removed using xattr as well:
$ xattr -d com.apple.quarantine

Note that you would have to do this process for every extended attribute the file has.

Well, back to the problem. In order to make Samba ignore the extended attributes, you could add the following to your smb.conf Samba configuration file (I’d put it in the [global] section):

[global]
unix extensions = no

Do a restart of the Samba daemon on the server, remount the service shares on your Mac, and everything should be back to normal. At least, that’s my experience this far :-) .

Happy hacking!


7 Responses to “The operation can’t be completed because you don’t have permission to access some of the items”