ldconfig should check immediately on startup whether it can write to /etc/* or not

Bug #271831 reported by Martin Olsson on 2008-09-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)

Bug Description

Very often I run "ldconfig" and I wait a long long time only to tell me that it can't write to /etc/something
This is my own fault because I forgot to write "sudo" in front of the "ldconfig" and that's fine.

However, ldconfig should not do all the work first and then check if the file is writable.
It would provide a much better user experience if ldconfig would immediately on startup verify that it has permissions to write to /etc/*SOME_NEED_FILES*, then do the work that takes a long time, and then finally write the updated SO cache info to the file in /etc/SOME_FILE

Just because it's a _command line_ tool for _developers_ does not mean it can't have "usability" or be smart about these things. And it's also an easy thing to fix I suspect.

Martin Olsson (mnemo) wrote :

The is the current behavior (unfortunate it can take >20 seconds before the error appears and I still have to wait yet another 20 seconds when I rerun ldconfig as root):

mnemo@gutsyT5:~/src/xcb/xcb-util$ ldconfig
/sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
mnemo@gutsyT5:~/src/xcb/xcb-util$ sudo ldconfig

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers