Permissions of basic executables lost after apt-get upgrade
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Permissions of basic executables lost after apt-get upgrade
Hi,
during my routine system upgrade, I discovered loads of 'permission denied' errors when the postinst scripts were executed, mostly generated by access to runlevel and pidof. Upon further investigation, I luckily noticed that various basic executables had lost all permissions (and maybe ownerships, all of them belong to root:root). This is a complete list of find / -perm 000 output (minus the usual errors in /proc):
It's obvious I won't be able to reboot my system, so I urgently need a list of suggested permissions and ownerships. Could someone maybe do a quick -l listing of the files in question on an up-to-date Debian Unstable or Sidux box? I would be most grateful.
Furthermore, how am I supposed to know if the packages I upgraded were installed correctly? Surprisingly, apt-get finished without an error (as did the various postinst subprocesses), so --fix-* will be of little help there. Should I maybe force reinstallation after correcting my dependencies? How can I make sure they won't be reset again? And what caused this error, anyways / how can I know if anything else got wrecked?
I suppose it's critical I don't mess up more stuff so I won't have to reboot, thus I'd rather wait for help than experiment with apt.
Thanks a bunch for any help.
David
Edit - Just to make this clear, the operation in question was a simple apt-get upgrade from official Debian / Sidux / *buntu sources only. (Except for wine.)
Alucard: Thanks, no problems so far Still didn't dare to thoroughly test stability, though.
craig: I don't quite remember why I introduced those, as far as I recall Ubuntu had some packets Debian / Sidux didn't. My packet list is selected by hand, so I figured it wouldn't hurt system stability, Sidux is more bleeding edge, anyways. (Alright, maybe I trusted dependency maintainers a little bit too much there... but apart from troubles with e17, which is more or less experimental anyways, this is the first problem I ran into after an apt-get upgrade.)
If you could explain why doing this is unnecessary / harmful, it would sure be interesting.
Ubuntu packages are for Ubuntu, the depends can be different, the libs can be different. Installing Ubuntu packages on a debian system will sooner or later result in a messed up system.
what packages do you need that aren't in a Debian repo?
Alright, that is new. I've been installing it by SVN for a long time, anyways, as it seems to be the only way to make sure it's ecomorph-compatible.
I suppose I'll just try running my system with restored permissions and reinstall if necessary. The latter would be quite a hassle, though - last time I had to setup my DVB-T receiver and WLAN card it took me severals days, and then I'd still have to handcraft my package list, encrypt my disks, fight ecomorph's alpha state etc.
Thanks for helping (And Ubuntu sources wil be removed. Their effect should wear off quite rapidly.)
Craigevil, I hope, made it clear enough. But if not, Whether they are Debian proper branches/versions or debian based distros stick to repos that pertain to your distro ONLY.
Mixing and matching might make fashionistas giddy with pleasure. But it doesn't work with Linux. It's a sure and certain path to hell and damnation! To say nothing about screwing up your OS. Oh, and your mother might disown you too.
After removing the evil Ubuntu packages you can find out what packages you need to reinstall to get the permissions corrected by using apt-file search
Like apt-file search hwclock
util-linux: /etc/init.d/hwclock.sh
util-linux: /etc/init.d/hwclockfirst.sh
util-linux: /lib/udev/hwclock-set
util-linux: /lib/udev/rules.d/85-hwclock.rules
util-linux: /sbin/hwclock
util-linux: /usr/share/doc/util-linux/README.Debian.hwclock
util-linux: /usr/share/man/man8/hwclock.8.gz
So you now know hwlock is in the util-linux package, reinstalling it "should" rest the permissions correctly.
Quote:
But if not, Whether they are Debian proper branches/versions or debian based distros stick to repos that pertain to your distro ONLY.
Not quite true as long as the distro is a true debian based distro like sidux, antix, mepis, knoppix and a few others you can normally install packages from their repos safely. sidux for example is basically debian sid with a different kernel, artwork, and a few scripts; same for antix and knoppix.If they use the "official" debian repos in their sources.list you are Ok to use their repos 99% of the time. Just make sure the repo is the same branch of debian, stable, testing or unstable. Ubuntu on the other hand while being based on Debian changes the packages and does not use debian repos in its sources.list.
root@frostbox:/home/vinter# dpkg -l '*ubuntu*' | grep ^ii
No packages found matching *ubuntu*.
Problem solved, I guess
Supposedly, the Ubuntu packages I once installed were replaced by more up-to-date Debian versions. The only repos using Ubuntu names in their paths were supplying me with wine, electricsheep and the likes, so maybe they weren't even Ubuntu-specific. (Removed them anyways, of course.)
Oh, and thanks for pointing me towards apt-file search, I was always wondering how you could do that.
After removing the evil Ubuntu packages you can find out what packages you need to reinstall to get the permissions corrected by using apt-file search
Like apt-file search hwclock
util-linux: /etc/init.d/hwclock.sh
util-linux: /etc/init.d/hwclockfirst.sh
util-linux: /lib/udev/hwclock-set
util-linux: /lib/udev/rules.d/85-hwclock.rules
util-linux: /sbin/hwclock
util-linux: /usr/share/doc/util-linux/README.Debian.hwclock
util-linux: /usr/share/man/man8/hwclock.8.gz
So you now know hwlock is in the util-linux package, reinstalling it "should" rest the permissions correctly.
Not quite true as long as the distro is a true debian based distro like sidux, antix, mepis, knoppix and a few others you can normally install packages from their repos safely. sidux for example is basically debian sid with a different kernel, artwork, and a few scripts; same for antix and knoppix.If they use the "official" debian repos in their sources.list you are Ok to use their repos 99% of the time. Just make sure the repo is the same branch of debian, stable, testing or unstable. Ubuntu on the other hand while being based on Debian changes the packages and does not use debian repos in its sources.list.
craig, I'm not going to get too deep into this. But I have to disagree with you. It's a know fact that one should use repos or sources that are for their specific distros (Mepis, Ubuntu, Debian, etc). It keeps one from tearing out one's hair, gnashing their teeth, ripping their raiment as well as keeping their OS working.
I've never know of anybody mixing distro repos and getting good results. I guess there are way of doing this. But why bother when there are sources galore to use for your specific distro? I feel using sources that are related to your system will keep you from jumping through hoop to make it work. Good god! Why not?
This illustrates the only difference I could find beween an executable of the same packet (!) being installed with sane permissions and one with 0000 set. The line documenting a "stat override" seems to cause the problem - but why is it there?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.