Strange stuff in OpenSuse

Today, I found a strange thing happening in a Suse 10 installation:

There is a strange file /usr/sbin/screen in the filesystem that is not what one would expect it to be

The windows users in our company are encouraged to install cooperative Linux for development and presentations on the road. For this, we prepared an OpenSuse installation so that everyone could start with his own ready-made linux and get familiar with what we use on most of our servers.

A coworker came to me this morning, complaining that his screen does not work, complaining simply

/usr/sbin/screen: permission denied

One might of course see that message and do the right conclusions at once, but we checked the permissions to the pts first, looked around a bit and then found out the reason: The permissions for /usr/sbin/screen are set to -rw-r–r– (not executable). Wondering why that might be, we looked at the contents (since setting it +x yielded even more strange errors) and found out it’s a short ascii file that looks like options to some X11 program. Finally it struck me that screen does not normally reside in /usr/sbin, so i tried

rpm -q -f /usr/sbin/screen

and there came the answer: The script belongs to a package called sax2-tools (the SuSE X11 configuration utility). Since screen itself was not installed on the fresh linux, the shell just assumed that the only match is not executable. After screen was installed, the shell found the right binary although of course /usr/sbin is in the $PATH before /usr/bin.

Things I learned today:

  • SuSE puts resource files in /usr/sbin (there’s another one called „demo“)
  • bash uses the first executable file in the path, not the first file
  • screen is an essential tool for development and should already be installed
  • trust your experience, but check everything nonetheless

Ein Kommentar

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert