[H-GEN] Help please: can't remove directory

David O'Brien dob12460 at bigpond.net.au
Thu Mar 25 04:57:22 EST 2004


 
 El Jue 25 Mar 2004 01:48, Sarah Hollings escribió:
> David O'Brien wrote:
> >
> > hi
> > I have a directory (skylab) in my  home directory, under which I have a
> > couple of subdirs. skylab is the name of another machine on my network
> > and I happily mount and umount, etc. One of these dirs I want to delete,
> > but for some reason cannot, as follows:
> >
> > [root@ david]# rm skylab/images
> > rm: cannot lstat `skylab/images': Input/output error
> >
> > I don't know why. I tried -f and -r and -rf but I don't want to mess with
> > that too much, especially as root  :-D
>
> If the "images" directory is local to your machine, ie not a remote
> directory then you should be able to remove it with
>
> [david at david]#  rmdir skylab/images
>
> ...or...
>
> [david at david]#  rm -Rf skylab/images
>

I couldn't make any of those work...

> Maybe you thought you had your remote windows box mounted via samba and
> created a directory locally when you thought it was remote?  If you did
> this as root, then one of the two above commands should still work if
> you execute them as root.
>

I unmounted everything in sight and /images is local to my linux /home dir 
under skylab

> > skylab is a Win2000 Server machine
> > the linux machine is running Mandrake 9.0
> >
> > I can create shares and mount, etc., as I like. I wonder if this images
> > directory is "stuck" as the linux box from which I'm mounting powered
> > down with it still mounted, and the share no longer exists on the Windows
> > machine.
> >
> > [david@ david]$ ll skylab/
> > ls: skylab/images: Input/output error
> > total 4
> > dr-xr-xr-x    1 david    david        4096 Mar 21 22:08 home/  #sharename
> > on skylab
>
> This listing above looks a little odd.  Do:
>
> [david at david]# ls -la skylab
> [david at david]# ls -lad skylab
>
> to see the permissions on those directories.  You might have managed to
> turn off the execute bit on the skylab directory.  Can you "cd" into the
> skylab directory?  If it looks like this:
>
Yes, like so:

[root@ david]# cd skylab/
[root@ skylab]# ls
home/  images/
[root@ skylab]#

(don't be confused by the home dir you see there. There is also one on the 
Windows box. So there is rocket/home/david and also skylab/home, where rocket 
is the name of the linux box. I'm beginning to think that was a bad idea...)

> [david at david]# ls -lad skylab
> drw-r--r--   2 david      david          68 Mar 25 01:43 skylab
>
> then try:
> [david at david]# chmod a+x skylab
>
> Rgds,

Here's the last session that I did:

[root@ david]# ls -la skylab/
ls: skylab/images: Input/output error
total 12
drwxr-xr-x    4 david    david        4096 Mar 24 18:43 ./
drwxr-xr-x   87 david    david        4096 Mar 25 19:41 ../
drwxr-xr-x    2 david    david        4096 Mar 24 18:43 home/
[root@ david]# ls -lad skylab/
drwxr-xr-x    4 david    david        4096 Mar 24 18:43 skylab//
[root@ david]# rm -Rf skylab/
rm: cannot lstat `skylab//images': Input/output error
[root@ david]#

It's all a bit confusing...  :-\

Thanks for your help. What to try now?
David

-- 


There are 10 types of people in the world -- those that understand binary, and 
those that don't





More information about the General mailing list