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 thoughts on “The operation can’t be completed because you don’t have permission to access some of the items”

  1. Hi guru,
    This is very helpful!
    I did as you mentioned and things went smooth!
    One point however, where do I find the smb.conf file?
    Thanks!

    Cheers,
    Michael

  2. Wow. Thanks so much for this super helpful tip. I’ve been scratching my head with this one for a while now.

    Here I was thinking it was strange permissions on my mac.

    Anyway – it worked beautifully. Once again, thanks.

  3. Thanks for the article. Worked for us. However, as of now, the OS X 10.6.4 update has a fix: “address issues copying, renaming, or deleting files on SMB file servers”

  4. I have a macbook pro. I keep getting the message too when I try for instance to upgrade my skype. wat and where is a xattr file?

Comments are closed.