3

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://192.168.1.1) 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.

3

There are actually two messages you're referring to:

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

and

"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 May 14 '13 at 17:25
0

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.

0

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 http://192.168.1.1 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 192.168.1.1

    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.

  • damn! this is first time I write that a lot of text in the web site. – Jurlie May 19 '13 at 21:42

You must log in to answer this question.

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