"rm: can't unlink 'files'",can't delete files

"rm: can't unlink 'files'",can't delete files

Post by Shi » Fri, 20 Sep 2002 14:29:28



Hi,
I copied files from ntfs partition with "cp -r" to
a ext3 linux partion.
Every source file's hard link number is 1.  However,
some destination files's hard link number changed.
Is it nornmal? What made this change?

When I tried to delete these destination files,
shell showed me "rm:can't unlink XXX :Permission denied"
(XXX are file's name).  This happened to files no matter
what their hard link number is, 1 or more.

I ran as the owner of these files, why still permission
denied?  Is there any way I can know where the other
hard link, pointing to the same disk space, is?

Anyone can tell me what caused this and how to solve
it?

Thanks
--
We never meet....

 
 
 

"rm: can't unlink 'files'",can't delete files

Post by Shi » Fri, 20 Sep 2002 15:12:56



> Hi,
> I copied files from ntfs partition with "cp -r" to
> a ext3 linux partion.
> Every source file's hard link number is 1.  However,
> some destination files's hard link number changed.
> Is it nornmal? What made this change?

> When I tried to delete these destination files,
> shell showed me "rm:can't unlink XXX :Permission denied"
> (XXX are file's name).  This happened to files no matter
> what their hard link number is, 1 or more.

> I ran as the owner of these files, why still permission
> denied?  Is there any way I can know where the other
> hard link, pointing to the same disk space, is?

> Anyone can tell me what caused this and how to solve
> it?

> Thanks

I am so stupid.....
I forget to turn on the "write" permission of the
destination directory.
After I did that, everything is okay.
--
We never meet....

 
 
 

1. Why doesn't echo "text" 'command' "more text" work?

                 ^                                        ^
Wrong quotes, should be -
   echo "You have" `grep Subject: /usr/spool/mail/me | wc -l` "messages."
or -
   echo "You have `grep Subject: /usr/spool/mail/me | wc -l` messages."

But, another problem is, if you've no mail, /usr/spool/mail/me does not
exist, leading grep to say:
   grep: can't open /usr/spool/mail/me
Wc will still report 0.

You might try -
   sh -c 'echo "You have `grep 2>/dev/null Subject: /usr/spool/mail/me | wc -l` messages."'

Hope this helps.

2. Root partition full

3. FTP driving me nuts (help)

4. "Can't open file" ( flat file ) and "flock()unimplemented ..."

5. alcatel speedtouch home and linux

6. RH 4.0 upgrade fails: 'hostname' ok, but 'uname -n' == "(none)"

7. question about ssh server version 2

8. WHY 'exec "$REALFILE" ${1+"$@"}'

9. PS gtroff and "font file '0'"

10. "EFBIG" and minimum granularity of 'write' to file

11. "McCabe's Cyclomatic Complexity" and "Halstead's Metrics"

12. help: "emacs:can't load library 'libXt.so.6'" . . .