I got into a weird situation. I got a 1Tb portable HD filled with some contents. It was used in Windows and as always packed with virus. I tried deleting some folders as root. But the following error returned

rm -R RECYCLER/
rm: cannot remove `RECYCLER/S-1-5-21-1659004503-1644491937-725345543-1003/Dc39.pptx': Operation not permitted
rm: cannot remove `RECYCLER/S-1-5-21-1659004503-1644491937-725345543-1003/Dc58.docx': Operation not permitted
rm: cannot remove `RECYCLER/S-1-5-21-1659004503-1644491937-725345543-1003/Dc17.JPG': Operation not permitted

ls -l returned

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf898cc8b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121602   976760536    7  HPFS/NTFS

ls -l RECYCLER/
total 12
drwxrwxrwx 1 user user 12288 Dec 11 21:13 S-1-5-21-1659004503-1644491937-725345543-1003
link|improve this question

50% accept rate
1  
What is the drive mounted as? – Hello71 Dec 29 '11 at 16:06
Its automounted in /media as with NTFS as the FS – user61954 Dec 29 '11 at 16:21
Extended attributes or ACLs on the files? – Daniel Beck Dec 29 '11 at 16:30
Is it possible that your drive is mounted as read-only? Executing mount provides this information. – Dennis Dec 29 '11 at 16:30
feedback

3 Answers

up vote 1 down vote accepted

The directory RECYCLER/S-1-5-21-1659004503-1644491937-725345543-1003 is presumably read-only. Run chmod -R u+w RECYCLER to set write permission on directories, then rm -rf RECYCLER.

If this is through a FUSE filesystem, it's possible that only the user who mounted the filesystem has write permission on it. In that case, run su user rm -rf RECYCLER.

link|improve this answer
When I run chmod -R u+w RECYCLER it gives the operation not permitted. I tried even running chown command – user61954 Dec 29 '11 at 16:23
@user61954 NTFS is usually provided through FUSE (via ntfs-3g) these days, so try su user … (second paragraph of my answer). – Gilles Dec 29 '11 at 16:37
Installed ntfs-3g and now it works fine :) – user61954 Dec 30 '11 at 2:48
feedback

On debian you can use the fsck.ntfs command.

I think the Package is called NTFSProgs.

link|improve this answer
feedback

Looks like some filesystem issues. Try chkdsk /F [Harddrive]: on a windows PC.

Example:

chkdsk /F E:

link|improve this answer
Sorry, I dont have windows – user61954 Dec 29 '11 at 16:22
If it's not going to be used on Windows again, I suggest you backup the useful files and reformat it with ext4 or other Linux-native filesystems. – netvope Dec 30 '11 at 0:46
The probelem is that its owner uses Windows :D – user61954 Dec 30 '11 at 2:28
feedback

Your Answer

 
or
required, but never shown

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