← Back to team overview

ubuntuforums-unanswered team mailing list archive

Re: [Question #76733]: Can you make a 3 line command into 1

 

Question #76733 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/76733

    Status: Open => Answered

Derek White proposed the following answer:
Firefox is actually run from /usr/lib/firefox-3.0.11/firefox.sh

Users would be able to bypass your command as it only changes access to one of the the symlinks.
Might even want to restrict access to 

Try this:
sh -c "sudo chmod 755 /usr/lib/firefox-3.0.11/firefox.sh && firefox && sudo chmod 754 /usr/lib/firefox-3.0.11/firefox.sh"

Possibly a better way would be to make it into a script:
#! /bin/sh
# /usr/local/bin/runfirefox.sh

chmod 755 /usr/lib/firefox-3.0.11/firefox.sh
chmod 755 /usr/lib/firefox-3.0.11/firefox
/usr/bin/firefox
chmod 754 /usr/lib/firefox-3.0.11/firefox.sh
chmod 754 /usr/lib/firefox-3.0.11/firefox

exit 0

Save it as /usr/local/bin/runfirefox.sh & chmod it to 770.

Run it with sudo runfirefox.sh from a terminal.

-- 
You received this question notification because you are a member of UF
Unanswered Posts Team, which is an answer contact for Ubuntu.