How to determine file in "Error opening file for reading" error
5,205
If it were me I would most likely use strace
, as in:
$ strace aterm
That will print out all the system calls that aterm
issues. It will be quite a lot of information. You may wish to limit it to just the open()
system call like so:
$ strace -etrace=open aterm
though I suppose it is possible that this isn't the result of an open()
syscall.
Related videos on Youtube
Author by
Mark Hildreth
Updated on September 18, 2022Comments
-
Mark Hildreth over 1 year
Since Ubuntu 12.04, whenever I open aterm, I get the following error message:
Error opening file for reading: Permission denied
aterm still opens and runs correctly, but I get that error message. I'd like to figure out what all this is about.
- Is someone familiar with this specific error for aterm?
- Otherwise, is there some log that records files that are attempting to be opened so I can determine what file it's complaining about? I've grepped my log files for "aterm" without success.
- Other tips for determining what the issue is?
-
Mark Hildreth almost 12 yearsExactly what I was looking for! Looks like it's
/var/run/utmp
and/var/log/wtmp
that were giving the issues. Now I have something more to go on. Thanks! -
grifferz almost 12 yearsGlad you found it. Terminal programs often have an option to disable the "add me to wtmp/utmp file" because (as you've found) that operation usually requires root access, so would need the program to be setuid.