[opensuse] cannot delete file
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello:
This occurs in openSUSE Leap 42.2.
user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir #
I can open and copy the file but I cannot delete it. I can not delete the copied file either.
linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory
The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error).
How can I solve this?
Thanks,
Istvan
What are perms of the directory? -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/ Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Aug 24, 2017, at 16:17:48, Istvan Gabor <suseuser04@gmail.hu> wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Could be for some reason the device on which this directory exists was mounted read-only. I've had that happen to me before. Look in /proc/mounts and see if any device is mounted with the ro flags. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 20:23:33 +0000, Tom Kacvinsky wrote:
On Aug 24, 2017, at 16:17:48, Istvan Gabor <suseuser04@gmail.hu> wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Could be for some reason the device on which this directory exists was mounted read-only.
No. It is mounted rw and I can delete other files. Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/24/2017 01:17 PM, Istvan Gabor wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Maybe a non-printing character got into the filename that rm doesn't fancy? Can you do a "rm -i *" in the directory and answer y or n appropriately? Regards, Lew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 13:29:29 -0700, Lew Wolfgang wrote:
On 08/24/2017 01:17 PM, Istvan Gabor wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Maybe a non-printing character got into the filename that rm doesn't fancy? Can you do a "rm -i *" in the directory and answer y or n appropriately?
I tried this before posting, didn't work. linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Donnerstag, 24. August 2017, 22:44:41 CEST schrieb Istvan Gabor:
linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
show me "lsattr image1.jpg" Cheers Mathias -- gpg key fingerprint: 5F64 4C92 9B77 DE37 D184 C5F9 B013 44E7 27BD 763C
On Thu, 24 Aug 2017 23:09:40 +0200, Mathias Homann wrote:
Am Donnerstag, 24. August 2017, 22:44:41 CEST schrieb Istvan Gabor:
linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
show me "lsattr image1.jpg"
linux:/home/user/tempdir # lsattr image1.jpg ---------------- image1.jpg Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 22:44:41 +0200 Istvan Gabor wrote:
On Thu, 24 Aug 2017 13:29:29 -0700, Lew Wolfgang wrote:
On 08/24/2017 01:17 PM, Istvan Gabor wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Maybe a non-printing character got into the filename that rm doesn't fancy? Can you do a "rm -i *" in the directory and answer y or n appropriately?
I tried this before posting, didn't work.
linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
Thanks,
Istvan
'lsof | grep image1.jpg' might show a process has the file (which is scheduled for deletion) open. It can't be fully deleted until it's been fully released is my guess. YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 17:14:31 -0400, Carl Hartung wrote:
On Thu, 24 Aug 2017 22:44:41 +0200 Istvan Gabor wrote:
On Thu, 24 Aug 2017 13:29:29 -0700, Lew Wolfgang wrote:
On 08/24/2017 01:17 PM, Istvan Gabor wrote:
On Thu, 24 Aug 2017 16:09:36 -0400, Ken Schneider - openSUSE wrote:
On 08/24/2017 03:51 PM, Istvan Gabor wrote:
Hello: This occurs in openSUSE Leap 42.2. user@linux:~> cd tempdir user@linux:~/tempdir> ls -l total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg user@linux:~/tempdir> rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory user@linux:~/tempdir> su Password: linux:/home/user/tempdir # rm image1.jpg rm: cannot remove 'image1.jpg': No such file or directory linux:/home/user/tempdir # I can open and copy the file but I cannot delete it. I can not delete the copied file either. linux:/home/user/tempdir # cp -a image1.jpg ../tempdir2 linux:/home/user/tempdir # ls -l ../tempdir2 total 3080 -rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg linux:/home/user/tempdir # rm ../tempdir2/image1.jpg rm: cannot remove '../tempdir2/image1.jpg': No such file or directory The file system is ext3 on a raid1 array partition. I did a fsck -f on the partition which did not fix the problem (fsck did not report any error). How can I solve this? Thanks, Istvan
What are perms of the directory?
linux:/home/user/tempdir # ls -ld ../tempdir drwxr-xr-x 2 user users 4096 Aug 22 13:09 ../tempdir/
Maybe a non-printing character got into the filename that rm doesn't fancy? Can you do a "rm -i *" in the directory and answer y or n appropriately?
I tried this before posting, didn't work.
linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
Thanks,
Istvan
'lsof | grep image1.jpg' might show a process has the file (which is scheduled for deletion) open. It can't be fully deleted until it's been fully released is my guess. YMMV
This gives nothing. linux:/home/user/tempdir # lsof | grep image1.jpg lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs Output information may be incomplete. linux:/home/user/tempdir # I cannot delete the file even after reboot. Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-24 12:51, Istvan Gabor wrote:
Hello:
This occurs in openSUSE Leap 42.2.
...*snip*...
How can I solve this?
Thanks,
Istvan
Try booting to root console (runlevel 3) by appending 3 to the boot parameters, then try deleting. -- -Gerry Makaro aka Fraser_Bell on the forums, IRC, and mail at openSUSE.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 24 Aug 2017 16:20:38 -0700, Fraser_Bell wrote:
On 2017-08-24 12:51, Istvan Gabor wrote:
Hello:
This occurs in openSUSE Leap 42.2.
...*snip*...
How can I solve this?
Thanks,
Istvan
Try booting to root console (runlevel 3) by appending 3 to the boot parameters, then try deleting.
I booted to root console as you suggested and I could delete the file. Still I am interested what is the reason I could not delete it either as the owner of the file or as root when booted to graphical mode. Especially, what is that property of the file which is inherited when copying the file and prevents deletion? Thanks again, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Have you done a file system check on the partition? I wonder if the file name is linked, via the ln command, to a different non-existent file. (But I don't know a command to see that information). Maybe the unlink command. https://www.gnu.org/software/libc/manual/html_node/Deleting-Files.html#Delet... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-25 11:04, Richmond wrote:
Have you done a file system check on the partition?
I wonder if the file name is linked, via the ln command, to a different non-existent file. (But I don't know a command to see that information).
-rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg The '1' means no hard link. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 25/08/17 11:40, Carlos E. R. wrote:
On 2017-08-25 11:04, Richmond wrote:
Have you done a file system check on the partition?
I wonder if the file name is linked, via the ln command, to a different non-existent file. (But I don't know a command to see that information).
-rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg
The '1' means no hard link.
Plus a hard link doesn't stop rm from working. Each file has a unique id - the inode number. A directory entry is simply a means of linking a human-friendly name to a computer-friendly file-id. Think dns linking domain names to ip addresses. So "deleting" a file simply means removing the file name from the directory. (Behind the scenes, the inode link count then gets decremented, and if it (along with the file open count) hits zero the file is then freed. Which is why *nix is quite happy to delete open files - the directory entry disappears, and then when any open file pointers disappear, so does the file itself.) Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/25/2017 11:04, Richmond wrote:
-rwxr-xr-x 1 user users 3147776 Dec 16 2016 image1.jpg
The '1' means no hard link.
Perhaps, as root, try chmod 777 ??? Also, in case of bizarre character in name, perhaps try rm *.jp* Of course, you know anything else in the directory with .jp in the name will disappear. -- -Gerry Makaro aka Fraser_Bell on the forums, IRC, and mail at openSUSE.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-08-25 01:50, Istvan Gabor wrote:
I booted to root console as you suggested and I could delete the file. Still I am interested what is the reason I could not delete it either as the owner of the file or as root when booted to graphical mode. Especially, what is that property of the file which is inherited when copying the file and prevents deletion?
My bet is the name. Some char in it that was not ascii, and the terminal did not copy. Maybe an space at the end or start. You might have tried bash completion instead of typing the name, but I think you tried the *. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
On 08/25/2017 03:42 AM, Carlos E. R. wrote:
On 2017-08-25 01:50, Istvan Gabor wrote:
I booted to root console as you suggested and I could delete the file. Still I am interested what is the reason I could not delete it either as the owner of the file or as root when booted to graphical mode. Especially, what is that property of the file which is inherited when copying the file and prevents deletion?
My bet is the name. Some char in it that was not ascii, and the terminal did not copy. Maybe an space at the end or start.
You might have tried bash completion instead of typing the name, but I think you tried the *.
Istvan: I misread, I see you *did* delete the file. My guess, though, would be the same, some character not ASCII. Either that, or something was holding it open while you were in the GUI and blocking attempts to delete it. -- -Gerry Makaro aka Fraser_Bell on the forums, IRC, and mail at openSUSE.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 24/08/17 23:44, Istvan Gabor wrote:
rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
- has mc been tried? : sometimes midnight commander is able to reach parts that others cannot touch regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 08/24/2017 10:44 PM, Istvan Gabor wrote:
linux:/home/user/tempdir # rm -i * rm: remove regular file 'image1.jpg'? y rm: cannot remove 'image1.jpg': No such file or directory
As you wrote, the problem is solved - or at least gone - now, however, I just wanted to mention that the next step would have been to run rm via 'strace -v' to see which system call was failing. Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (12)
-
Bernhard Voelker
-
Carl Hartung
-
Carlos E. R.
-
ellanios82
-
Fraser_Bell
-
Istvan Gabor
-
Ken Schneider - openSUSE
-
Lew Wolfgang
-
Mathias Homann
-
Richmond
-
Tom Kacvinsky
-
Wols Lists