Thursday, December 14, 2017

linux mint - Root user can't remove folder


There is a folder /mnt/shared which root user can't access/modify or remove.


# ls -lai /mnt
total 4
16662 drwxr-xr-x 3 root root 0 Mar 27 14:30 .
2 drwxr-xr-x 23 root root 4096 Mar 27 14:26 ..
16663 dr-xr-xr-x 2 root root 0 Mar 27 14:30 shared
# chattr -i /mnt/shared/
chattr: No such file or directory while trying to stat /mnt/shared/
# rmdir /mnt/shared/
rmdir: failed to remove ‘/mnt/shared/’: Permission denied
# cd /mnt/shared/
-su: cd: /mnt/shared/: No such file or directory
# ls -i /mnt
16663 shared
# find . -inum 16663 -delete
find: `./shared': No such file or directory

Running fsck doesn't help.
OS: Linux Mint 17.3


Answer



Finally i found what caused an issue - autofs.
After stopping autofs service undeleteable folder disappeared.


#service autofs stop

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...