Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-18-2010, 06:31 PM
|
#1
|
LQ Newbie
Registered: Jul 2004
Posts: 24
Rep:
|
Symbolic links changing on reboot
For a couple of (boring) reasons, I've got Firefox 3.5 and 3.6 installed on a Ubuntu 9.04 machine.
In /usr/bin, there are these symbolic links:
/usr/bin/firefox -> firefox-3.5
/usr/bin/firefox-3.5 -> ../lib/firefox-3.5.8pre/firefox.sh
/usr/bin/firefox-3.6 -> ../lib/firefox-3.6b4/firefox
That is what it looks like after boot. I need to change the firefox link to firefox-3.6 (so I have /usr/bin/firefox -> firefox-3.6 ). I've done that, and it all works fine.
Then I reboot, and my change vanishes.
My problem is not that it happens, but that I have no idea what is doing it. There's nothing in /etc/init.d I can blame, cron is not doing it, and I've even searched all the files under /etc for anything that might tell me something, and I cannot find it.
I don't even need to know a full "fix", I just want to know what the application/script/process is, so I can look it up and think about changing it.
Any ideas of what I should be looking at?
Last edited by Grobbendonk; 01-18-2010 at 06:31 PM.
Reason: typo
|
|
|
01-19-2010, 01:19 AM
|
#2
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
If you use KDE (or Gnome, for all I know) there exists a ~/.kde4 directory for every user. You might investigate there or just create a new user and try the link-magic  from there.
And then, did you check the access settings for all those files and symbolic links, are they maybe root's and you're forbidden to touch them  ?
|
|
0 members found this post helpful.
|
01-19-2010, 08:20 AM
|
#3
|
LQ Newbie
Registered: Jul 2004
Posts: 24
Original Poster
Rep:
|
That is true, I could override the behaviour easily with a user specific link that occurs earlier in the path for the user. But that's not really the question - I need to know what is changing the links.
The links are owned by root, as are most things in /usr/bin. I don't want to change that (and I have to be root to repair the damage being done by the unknown process - access is not the problem)
|
|
|
01-19-2010, 08:25 AM
|
#4
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
What I meant is that the links might automatically revert to the original state after boot. What happens if a normal user creates a link exactly like root in the same directory? Dead links? What says "ls -la" in that directory?
|
|
|
01-19-2010, 08:54 AM
|
#5
|
LQ Newbie
Registered: Jul 2004
Posts: 24
Original Poster
Rep:
|
Quote:
Originally Posted by JZL240I-U
What I meant is that the links might automatically revert to the original state after boot.
|
Yes, that is exactly the question - what is causing the links to change when I reboot?
Quote:
Originally Posted by JZL240I-U
What happens if a normal user creates a link exactly like root in the same directory? Dead links? What says "ls -la" in that directory?
|
Nothing - it's /usr/bin, so a normal user does not have any permissions. Root can change the links of course, no problem.
ls -la shows no hidden files.
|
|
|
01-20-2010, 04:55 AM
|
#6
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
Is this a virtual machine? 
|
|
|
01-20-2010, 08:14 AM
|
#7
|
LQ Newbie
Registered: Jul 2004
Posts: 24
Original Poster
Rep:
|
No, physical, but that's irrelevant - it is part of the boot process that is overwriting the links. The links are fine if I stop the machine and mount the root disk on another box, they change on start up.
I do have a VM - ubuntu 9.04, off the shelf, plus standard packages, plus Firefox 3.6 and my links as above. It is doing exactly the same thing.
|
|
|
01-20-2010, 08:33 AM
|
#8
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
Long shot: Try the file system tools like "dump2fs" whether there remain traces ... umm, no, you'd find the corpse but not the perpetrator of the deed. Why not "chmod 000 /usr/bin/firefox -> firefox-3.6" and after booting look for errors or warnings in "dmesg"'s output?
|
|
|
01-21-2010, 07:15 AM
|
#9
|
LQ Newbie
Registered: Jul 2004
Posts: 24
Original Poster
Rep:
|
Nice idea - try to force it to fall over.
Just tried it, nothing in dmesg, and the links were replaced again, with normal permissions. Whatever is doing it is definitelydoing it as root.
|
|
|
01-21-2010, 07:19 AM
|
#10
|
Senior Member
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,639
Rep: 
|
Grrr. Did you look into the logs as well? Just to be on the secure side
Code:
cat /var/log/* | grep firefox
cat /var/log/* | link
Rootkit?
<edit> Oh yes, do you have ACL enabled? "man getfacl"... </edit>
Last edited by JZL240I-U; 01-21-2010 at 07:23 AM.
Reason: ACL?
|
|
|
01-21-2010, 07:47 AM
|
#11
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
|
@OP
It looks like it's apparmor. Take a look at this for more details.
Regards
|
|
|
All times are GMT -5. The time now is 12:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|