LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-18-2010, 06:31 PM   #1
Grobbendonk
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Rep: Reputation: 0
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
 
Old 01-19-2010, 01:19 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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.
Old 01-19-2010, 08:20 AM   #3
Grobbendonk
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 0
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)
 
Old 01-19-2010, 08:25 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 01-19-2010, 08:54 AM   #5
Grobbendonk
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by JZL240I-U View Post
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 View Post
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.
 
Old 01-20-2010, 04:55 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Is this a virtual machine?
 
Old 01-20-2010, 08:14 AM   #7
Grobbendonk
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 0
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.
 
Old 01-20-2010, 08:33 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 01-21-2010, 07:15 AM   #9
Grobbendonk
LQ Newbie
 
Registered: Jul 2004
Posts: 24

Original Poster
Rep: Reputation: 0
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.
 
Old 01-21-2010, 07:19 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 01-21-2010, 07:47 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@OP
It looks like it's apparmor. Take a look at this for more details.

Regards
 
  


Reply

Tags
boot, link, symbolic



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with changing ownership of Symbolic Links JoeDo Linux - Newbie 2 04-08-2009 03:28 PM
symbolic links durden2.0 Linux - Newbie 6 11-12-2008 03:06 AM
Symbolic links Vs Hard links sulekha Linux - General 2 10-02-2008 07:03 AM
cp and symbolic links? sausagejohnson Linux - General 3 07-19-2005 01:25 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration