Page 1 of 1

[SOLVED]How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 15:48
by mackowiakp
After upgrade M8->M9 one dir looks like this:
Code: Select all
d?????????  ? ?      ?                 ?                ? mnt/

It happens probably because of USB memory stick failure. The USB mem was mounted to this mnt dir.
How can I chmod/user/group or delete such directory?

Re: How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 16:30
by sturmvogel
Which command was used to get this output? "ls -l /" ?
E.g.:
Code: Select all
[test8@test8 ~]$ ls -l /
insgesamt 72
lrwxrwxrwx   1 root root     7 Jul 31  2020 bin -> usr/bin/
drwxr-xr-x   5 root root  4096 Sep  2 15:26 boot/
-rw-------   1 root root  2022 Sep  2 15:42 dead.letter
drwxr-xr-x  19 root root  3700 Sep  9 16:12 dev/
drwxr-xr-x 104 root root 12288 Sep  9 16:23 etc/
drwxr-xr-x   3 root root  4096 Jun 11 13:03 home/
drwxr-xr-x   2 root root  4096 Jul 31  2020 initrd/
lrwxrwxrwx   1 root root     7 Jul 31  2020 lib -> usr/lib/
lrwxrwxrwx   1 root root     9 Jul 31  2020 lib64 -> usr/lib64/
drwx------   2 root root 16384 Jun 11 12:48 lost+found/
drwxr-xr-x   2 root root  4096 Jul 31  2020 media/
drwxr-xr-x   2 root root  4096 Jul 31  2020 mnt/
drwxr-xr-x   3 root root  4096 Jun 11 13:17 opt/
dr-xr-xr-x 210 root root     0 Sep  9 16:12 proc/
drwxr-x---   9 root root  4096 Sep  9 16:27 root/
drwxr-xr-x  28 root root   820 Sep  9 16:12 run/
lrwxrwxrwx   1 root root     8 Jul 31  2020 sbin -> usr/sbin/
drwxr-xr-x   2 root root  4096 Jul 31  2020 srv/
dr-xr-xr-x  13 root root     0 Sep  9 16:12 sys/
drwxrwxrwt  11 root root   360 Sep  9 16:17 tmp/
drwxr-xr-x  13 root root  4096 Jun 11 12:52 usr/
drwxr-xr-x  14 root root  4096 Jun 11 13:08 var/
[test8@test8 ~]$


You shouldn't delete /mnt as this is a base directory. You should better try to change the owner via:
Code: Select all
# chown -R root:root /mnt

Re: How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 16:53
by mackowiakp
The command was ls -la.
I try to change user/group using command You mentioned. Error "Permission deny"

Re: How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 16:56
by sturmvogel
Did you execute this command as root user?

Re: How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 17:01
by mackowiakp
yes

Re: How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 17:05
by mackowiakp
Boot from Knoppix and fsck from gparted, resolved the problem

Re: [SOLVED]How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 18:13
by morgano
Good thinking :)
My bootable tool favourite was https://www.system-rescue.org/
But recently Mageia Live Xfce 32 bit, with persistence and added tools :)

Re: [SOLVED]How to delete file with no mod user and group

PostPosted: Sep 9th, '23, 18:25
by mackowiakp
:D :lol: