I am trying to remove a file in my /tmp dir I have just been made aware of due to Lynis.
One security check suggested I remove all files in tmp over 90 days old.
I have a cronjob now:
find /tmp/ -type f -mtime +90 -exec rm -rf {} \; > "$report_path" 2>"$error_log"
Every error log contains this.
/bin/find: β/tmp/.mount_jetbrayU5cHzβ: Permission denied
This is what the file looks like to root (whoami
returns root - both sudo su
and su
):
d????????? ? ? ? ? ? .mount_jetbrayU5cHz
This what the file looks like to my user:
drwxr-xr-x 6 root root 0 Jun 2 20:54 .mount_jetbrayU5cHz
I have also run the following commands (in root):
lsattr: Permission denied while trying to stat .mount_jetbrayU5cHz
ls: cannot access '/tmp/.mount_jetbrayU5cHz': Permission denied
chmod: cannot access '.mount_jetbrayU5cHz': Permission denied
cd: permission denied: .mount_jetbrayU5cHz
For some reason remove's arguments are also ignored in relation to this directory:
$ rm -rf .mount_jetbrayU5cHz
rm: cannot remove '.mount_jetbrayU5cHz': Is a directory
I have seen some other posts related to question marks and tmp but they included this happening to the user, not the root, and if it was root then it was a protected symlink - there was also a thread with a mounted filesystem and some directories created by automatic processes. This looks to be created by jetbrains but it looks like a regular directory to me.
I am not overly concerned about removing this dir as it's not getting in the way of anything, its just very odd and I am wondering if it is part of a bigger problem.
Any advice is appreciated.
edit: I am currently running Arch
edit: I'm able to confirm this doesn't persist through reboot and is now. .mount_jetbrahVDgXi
Everything about this files behaviour is strange as the error came across when running a command for files over 90 days old.
Wondering why there are no threads about this with Jetbrains.
Kind of concerning that they can make a directory out of root's control.