0

When I attach the external hard drive, the folders have a lock icon on them and i am unable to delete them.

I tried to use sudo chown -R $USER:$USER $HOME but to no avail, this did not work. Please tell how to remove that icon and edit the read-only permission.

4
  • Were those files created in Windows environment? Apr 19, 2013 at 13:43
  • No, but they were transferred to hard drive in windows platform.
    – Saket
    Apr 19, 2013 at 14:01
  • Are you able to open those files? Apr 19, 2013 at 14:15
  • yes,able to copy and paste new files but unable to delete files
    – Saket
    Apr 22, 2013 at 4:09

1 Answer 1

0

This generally happens when using an NTFS-formatted drive and is due to how NTFS/Windows handles file permissions (in short, not how the *nix world does it).

You have to adjust your fstab settings to mount the drive with appropriate permissions. This related question has more details, but the basics of it are that you want to set the uid and gid values to your user and group. This mounts it as your user, instead of as root.

2
  • Hi, my system was like this, the icons were with a lock on it. then I saw in a forum that the partition should be in trouble, and because it is an external drive, with Windows partition (NTFS) I preferred to open the drive in Windows and have it scan, Windows has encountered errors and corrected them. After that, Linux no longer showed the padlock on the icon. (P.S.: This probably happened because I removed the device without first ejecting it) Picture of padlock: i.stack.imgur.com/TK5mB.png Apr 16, 2019 at 16:36
  • (Tags that I used until I found an answer: e-sata error, external usb hdd, read only, fuseblk, ro, mount, fstab, files locked, can not eject) Apr 16, 2019 at 16:45

You must log in to answer this question.

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