I have a USB drive plugged into my Asus RT-N66U router and shared over SMB. I originally formatted this drive on a Mac. I have two Trendnet TV-IP572PI surveillance cameras that records snapshots/video to this drive over SMB. Sometimes when I mount the drive from my Mac ('Connect to server' @ smb:// and attempt to delete old directories off of it, I get this error:

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

This is extremely frustrating since I have to unplug the USB drive, plug it back into my Mac, and format it to get it working again. I assume this is some kind of permissions problem, and when these permissions are messed up, the cameras aren't writing to the drive. I may not notice this for days if I have been out of town.

Searching Google for this error mostly turns up results about disabling a unix extensions setting in smb.conf on the server you are connecting to. I have no way to do this since the Samba server runs off of the Asus router. Email support from ASUS has not been helpful so far, with recommendations to upgrade the firmware and do a hard reset on the router (have latest firmware already). I believe this problem stems from mounting the drive from my Mac.

Thanks in advance.

4 Answers 4


There are actually two messages you're referring to:

"This operation can't be completed because the item is in use"


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

If you see the first one - I sometimes get that message too. Quite often this can be resolved by running: sudo lsof | grep <filename> in Terminal.app - obviously replace <filename> with the actual name of the file you're trying to delete. I typically get this when trying to empty the trash, but if the trash is not supported on the filesystem you have mounted, you may see it when trying to delete.

What lsof does is it lists all open files, and shows which process opened each of them. Quite often this will be a quick look process that opened the file and somehow didn't close it (it will do that when you display a list of movie files in Finder - it will then try to show you the first frame of the movie in the preview, and it's using Quick Look to do that).

Usually after running the lsof the files are closed (that's if lsof doesn't show anything), or I can just kill the quick look process and then empty the trash.

As for the other message - the best thing to do is to run ls -la <filename> or ls -lad <directory> to see the permissions on the file or the folder you're trying to remove. This may give you a better idea where the problem is.

  • 1
    Hmm, lsof doesn't seem to return anything, and the error happens on any directory I try to delete. Permissions appear to be the same on all directories/files.
    – Vincent
    Commented May 14, 2013 at 17:25
  • What @mike described is exactly what is happening for me on macOS Catalina 10.15.2 and SMB share on Linux. By just opening a directory with images on SMB share in Finder results in QuickLook process opening the files, apparently to generate thumbnail previews. Somehow QuickLook is reluctant to release those files and I only could force it by running kill -9 (normal kill wouldn't work). Now, this never was a problem on High Sierra – a few odd instances notwithstanding. On Catalina it happens almost all the time.
    – ILIV
    Commented Jan 25, 2020 at 7:56

I found that connecting through FTP using Filezilla worked better instead. It doesn't give MacOS the opportunity to make any changes to the file structure there.


What file system do you create on your shared drive? Looks like you are using wrong FS. I use Ext3 at the same router and connect successfully from my pc and from my mac. I always have necessary permissions to do anything.

BTW you should remember, you cannot use Ext3 disk directly with your mac. Only thru the router.

To format disk to Ext3 FS you can do it with Linux PC (if you have one) or with router itself:

  1. Enable telnet access to your router:

    a. connect to your router's control panel via web-broser (e.g. access or what is IP of your router is)

    b. Go Administration->System-> Enable Telnet (check yes)

    c. press "Apply". Wait until router restarts.

  2. Connect to router by telnet:

    a. run Terminal

    b. write telnet usually it should be

    c. log in with your administrator's login|pwd

  3. Format HDD:

    a. check which device is your HDD: write df you will see file systems. Your device should be the biggest filesystem (the biggest number of blocks). It will be something like /dev/sda1 or similar.

    b. format it: mkfs.ext3 /dev/sda1 (put correct partition identifier you've seen in df's output.

  4. Restart your router.
  5. Enjoy.

P.S. You may want to disable Telnet access in security reason.

P.P.S. You should consider backup your data before this operation, not after.


To solve this problem if we are using a Linux server we have to install the Samba package containing VFS modules and edit the samba config file. That file is the > /etc/samba/smb.conf file.

fedora server: Installing VFS modules on the Fedora server you have to Download the files from fedora pkgs.org And go to the directory that file downloaded and install the file in the terminal. link: https://fedora.pkgs.org/34/fedora-updates-testing-x86_64/samba-vfs-cephfs-4.14.2-1.fc34.x86_64.rpm.html

sudo dnf install ./samba-vfs-cephfs-4.14.2-1.fc34.x86_64.rpm

ubuntu server: Open a terminal and type:

sudo apt install --no-install-recommends samba-vfs-modules

config the > /etc/samba/smb.conf file. open the file wth a editor and in the [global] section add vfs objects = fruit streams_xattr

edited file

After that, you have to restart the samba service.


sudo service smb restart


sudo service smbd restart

After that reconnect your iOS,iPadOS device to the server.

Documentation for the fruit SAMBA VFS module can be found at https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html.

You must log in to answer this question.

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