Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an external drive (WD My Book World) mounted on my Ubuntu system which I've used for backups over the last few years. Some of the backups included SVN repositories which now include files which I can't appear to delete. I can mv them and view their contents, but that seems to be it. My question is: how can I remove these files from this external drive?

Here's a sample of what I'm dealing with:

root@zodiac:/mnt/mybook# mount | grep mybook
// on /mnt/mybook type cifs (rw,mand)

root@zodiac:/mnt/mybook# ls -lh entries 
-r-xr--r-- 1 www-data www-data 1.2K 2008-03-26 21:29 entries

root@zodiac:/mnt/mybook# file entries 
entries: ASCII text

root@zodiac:/mnt/mybook# head -n5 entries 


root@zodiac:/mnt/mybook# stat entries 
  File: `entries'
  Size: 1201        Blocks: 8          IO Block: 16384  regular file
Device: 18h/24d Inode: 2149510     Links: 1
Access: (0544/-r-xr--r--)  Uid: (   33/www-data)   Gid: (   33/www-data)
Access: 2008-03-26 21:29:34.000000000 -0700
Modify: 2008-03-26 21:29:34.000000000 -0700
Change: 2010-01-09 08:59:06.000000000 -0800

root@zodiac:/mnt/mybook# rm entries 
rm: cannot remove `entries': No such file or directory

root@zodiac:/mnt/mybook# cat > entries 
-su: entries: No such file or directory

root@zodiac:/mnt/mybook# lsattr entries
lsattr: Inappropriate ioctl for device While reading flags on entries


root@zodiac:/mnt/mybook# grep mybook /proc/self/mountinfo
33 18 0:24 / /mnt/mybook rw - cifs // rw,mand,unc=\\\PUBLIC,username=root,posixpaths,acl,rsize=16384,wsize=57344
share|improve this question

migrated from Jan 9 '10 at 18:09

This question came from our site for professional and enthusiast programmers.

What does grep mybook /proc/self/mountinfo say? – Tobu Jan 9 '10 at 18:02
@Tobu, Thanks and see my reply above. Cheers. – jackthecoiner Jan 9 '10 at 22:37
CIFS is Samba or the windows file server, right? A remote filesystem is acting up. – Tobu Jan 9 '10 at 23:02
tail -F /var/log/syslog /var/log/kern.log while you do the rm entries could tell you more. – Tobu Jan 9 '10 at 23:07
I appreciate the replies. Neither of those logs showed any activity when I tried to rm entries. Any other thoughts? I'm not aware of another fs that this device will mount with which might behave better. – jackthecoiner Jan 10 '10 at 1:12
up vote 2 down vote accepted

The errors indicate that the file system is corrupted. This might be from not unpluggingn the disk correctly, or it might be defective. You need to run a file system checker (fsck) on the partition or reformat it and see if it is reliable after that.

share|improve this answer

Looks like a server configuration error. The fact that the share name is PUBLIC is a red flag. I wouldn't necessarily expect a PUBLIC share to be writable.

share|improve this answer
There are tons of other files on the share that I can modify and remove. I can also create new files there. Some of the files, though, just won't cooperate. PUBLIC is just the name of the partition that comes on the drive when it comes from the factory. – jackthecoiner Jan 10 '10 at 2:37

You must log in to answer this question.

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