I have an external HDD mounted as a smb share (via a Iomega iConnect), however I can't delete a directory on it:

Permission Denied

Looking at properties:

The permissions of "abc" could not be determined

I navigated to it in terminal via .gvfs but when I use chmod 777 -R . For each file I get:

Operation not supported.

How can I delete this directory?

I'm deleting a large directory and 99% of files deleted OK, just not along one particular path.

sudo rm -rf "abc" gave:

rm: cannot remove "abc" Permission denied.

I can copy to and remove files from elsewhere on the disc

  • Obviously, you need to remount the share with read-write rights, and chmod does not work because you belong to non-granted user group. – Andrejs Cainikovs Apr 5 '13 at 18:29
  • Regarding the notices: Samba share so I assume it is an NTFS formatted disc. If so... NTFS does not understand Linux permissions. So commands like chmod, chown, chgrp do not work.

  • When facing permissions you can try to remove the directory with sudo in front of the command. If this shows an error please add it into your question.

  • Samba permissions are stored in /etc/samba/smb.conf It might be set up wrongly (this will only be a problem if this is the 1st time you are using this disc. Otherwise this file probably is correct)

  • If all fails you also need to check how the disc was mounted. If is is mounted as read only you can not alter the disc. This can happen if the disc has errors (think chkdsk /f in Windows terms). More info can be found here: Fix corrupt NTFS partition without Windows

  • thanks for the tips - I've updated question. I couldn't tell you if it's NTFS or FAT – NikolaiDante Apr 5 '13 at 18:52
  • ah that does not really matter @NikolaiDante if it is fat you have a few more tools from within Ubuntu. BTW sudo fdisk -l will show you ;) – Rinzwind Apr 5 '13 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.