Help ! usr/bin/thunderbird: which: Permission denied

If none of the more specific forums is the right place to ask
Post Reply
Message
Author
ikar0
Posts: 14
Joined: 2014-04-26 10:53

Help ! usr/bin/thunderbird: which: Permission denied

#1 Post by ikar0 »

Hi all :D

Thunderbird does not start anymore ( MATE desktop , autostart programs menu ) :shock: :shock:

Code: Select all

ikar0@linux:~$ thunderbird
    /usr/bin/thunderbird: 1: /usr/bin/thunderbird: which: Permission denied
    ikar0@linux:~$ sudo thunderbird
    [sudo] password di ikar0:
    /usr/bin/thunderbird: 1: /usr/bin/thunderbird: which: Permission denied
    ikar0@linux:~$ sudo su
    root@linux:/home/ikar0# thunderbird
    /usr/bin/thunderbird: 1: /usr/bin/thunderbird: which: Permission denied
These are the file permission

Code: Select all

lrwxrwxrwx 1 root root 33 nov 22 18:18 /usr/bin/thunderbird -> ../lib/thunderbird/thunderbird.sh
ikar0@linux:~$ ls -l /usr/lib/thunderbird/thunderbird.sh
-rwxr-xr-x 1 root root 2665 nov 22 16:55 /usr/lib/thunderbird/thunderbird.sh
Can anyone help me ? :?: :?:

Thanks in advance , :D

Ikar0

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Help ! usr/bin/thunderbird: which: Permission denied

#2 Post by Capitain_Jack »

Please, post the contents of /usr/lib/thunderbird/thunderbird.sh:

Code: Select all

cat /usr/lib/thunderbird/thunderbird.sh
If don't work, try as root.
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

ikar0
Posts: 14
Joined: 2014-04-26 10:53

Re: Help ! usr/bin/thunderbird: which: Permission denied

#3 Post by ikar0 »

Code: Select all

 ikar0@linux:~$     cat /usr/lib/thunderbird/thunderbird.sh
#!/bin/sh

set -e

# Firefox launcher containing a Profile migration helper for
# temporary profiles used during alpha and beta phases.

# Authors:
#  Alexander Sack <asac@jwsdot.com>
#  Fabien Tassin <fta@sofaraway.org>
#  Steve Langasek <steve.langasek@canonical.com>
#  Chris Coulson <chris.coulson@canonical.com>
# License: GPLv2 or later

MOZ_LIBDIR=/usr/lib/thunderbird
MOZ_APP_LAUNCHER=`which $0`
EXE=thunderbird
MOZ_APP_NAME=thunderbird

export MOZ_APP_LAUNCHER

while [ ! -x $MOZ_LIBDIR/$EXE ] ; do
    if [ -L "$MOZ_APP_LAUNCHER" ] ; then
        MOZ_APP_LAUNCHER=`readlink -f $MOZ_APP_LAUNCHER`
        MOZ_LIBDIR=`dirname $MOZ_APP_LAUNCHER`
    else
        echo "Can't find $MOZ_LIBDIR/$EXE"
        exit 1
    fi
done

usage () {
    $MOZ_LIBDIR/$EXE -h | sed -e 's,/.*/,,'
    echo
    echo "      -g or --debug          Start within debugger"
    echo "      -d or --debugger       Specify debugger to start with (eg, gdb or valgrind)"
    echo "      -a or --debugger-args  Specify arguments for debugger"
}

moz_debug=0
moz_debugger_args=""
moz_debugger="gdb"

while [ $# -gt 0 ]; do
    case "$1" in
        -h | --help )
            usage
            exit 0
            ;;
        -g | --debug )
            moz_debug=1
            shift
            ;;
        -d | --debugger)
            moz_debugger=$2;
            if [ "${moz_debugger}" != "" ]; then
	            shift 2
            else
                echo "-d requires an argument"
                exit 1
            fi
            ;;
        -a | --debugger-args )
            moz_debugger_args=$2;
            if [ "${moz_debugger_args}" != "" ] ; then
                shift 2
            else
                echo "-a requires an argument"
                exit 1
            fi
            ;;
        -- ) # Stop option processing
            shift
            break
            ;;
        * )
            break
            ;;
    esac
done

if [ $moz_debug -eq 1 ] ; then
    case $moz_debugger in
        memcheck)
            debugger="valgrind"
            ;;
        *)
            debugger=$moz_debugger
            ;;
    esac

    debugger=`which $debugger`
    if [ ! -x $debugger ] ; then
        echo "Invalid debugger"
        exit 1
    fi

    case `basename $moz_debugger` in
        gdb)
            exec $debugger $moz_debugger_args --args $MOZ_LIBDIR/$MOZ_APP_NAME "$@"
            ;;
        memcheck)
            echo "$MOZ_APP_NAME has not been compiled with valgrind support"
            exit 1
            ;;
        *)
            exec $debugger $moz_debugger_args $MOZ_LIBDIR/$MOZ_APP_NAME "$@"
            ;;
    esac
else
    exec $MOZ_LIBDIR/$EXE "$@"
fi
   

User avatar
Capitain_Jack
Posts: 153
Joined: 2017-12-15 12:07
Location: Brazil capital, Brasilia, At the favela.

Re: Help ! usr/bin/thunderbird: which: Permission denied

#4 Post by Capitain_Jack »

I guess everything is ok with the shell file, have you launched the thunderbird first time as root? if so, it's the same problem found here and can be solved following the ~/HOME root ownership guide in here:
https://askubuntu.com/questions/676207/ ... ion-issues
"Great spirits have always encountered violent opposition from mediocre minds."
Albert Einstein
"All wrong-doing arises because of mind. If mind is transformed can wrong-doing remain?"
Buddha

User avatar
debiman
Posts: 3064
Joined: 2013-03-12 07:18

Re: Help ! usr/bin/thunderbird: which: Permission denied

#5 Post by debiman »

^ try that.
what is the ownership of ~/.thunderbird and all subfolders?

how did you install thunderbird?
is your system up-to-date?

do not try to run thunderbird as root or sudo.

can you execute /usr/lib/thunderbird/thunderbird directly?

ikar0
Posts: 14
Joined: 2014-04-26 10:53

Re: Help ! usr/bin/thunderbird: which: Permission denied

#6 Post by ikar0 »

Code: Select all

ikar0@linux:~$ ls -l ~/.thunderbird
totale 12
drwx------  3 ikar0 ikar0 4096 dic  1 18:52 Crash Reports
-rw-rw-r--  1 ikar0 ikar0  104 apr 19  2017 profiles.ini
drwxr-xr-x 13 ikar0 ikar0 4096 dic 28 12:51 zu0kmulx.default

Code: Select all

drwxrwxrwx  4 ikar0 ikar0     4096 apr 19  2017 .thunderbird
I have installed thunderbird with APT

Code: Select all

ikar0@linux:/usr/bin$ ls -l thunderbird
lrwxrwxrwx 1 root root 33 nov 22 18:18 thunderbird -> ../lib/thunderbird/thunderbird.sh
if I go in directory " /usr/lib/thunderbird/thunderbird.sh " I can start It

Code: Select all

ikar0@linux:/usr/bin$ cd /usr/lib/thunderbird/
ikar0@linux:/usr/lib/thunderbird$ sh ./thunderbird.sh
1514536828645	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing permissions.0: Unknown permission "webNavigation"
1514536828648	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing permissions.1: Unknown permission "webRequest"
1514536828651	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing permissions.2: Unknown permission "webRequestBlocking"
1514536828653	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing permissions.3: Unknown permission "tabs"
1514536828655	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing permissions.4: Unknown permission "cookies"
1514536828657	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing browser_action: An unexpected property was found in the WebExtension manifest.
1514536828659	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing default_locale: An unexpected property was found in the WebExtension manifest.
1514536828659	addons.webextension.https-everywhere@eff.org	WARN	Loading extension 'https-everywhere@eff.org': Reading manifest: Error processing devtools_page: An unexpected property was found in the WebExtension manifest.

(thunderbird:26363): Gtk-CRITICAL **: gtk_icon_theme_append_search_path: assertion 'path != NULL' failed


steve_v
Posts: 772
Joined: 2012-10-06 05:31
Location: New Zealand
Has thanked: 2 times
Been thanked: 3 times

Re: Help ! usr/bin/thunderbird: which: Permission denied

#7 Post by steve_v »

That error is fairly obviously from the 'which $0" call in the startup script...
What are the permissions of /bin/which and the symlink /usr/bin/which?
Does the which command work if you use it yourself, e.g. 'which ls'?

ikar0
Posts: 14
Joined: 2014-04-26 10:53

Re: Help ! usr/bin/thunderbird: which: Permission denied

#8 Post by ikar0 »

Code: Select all

ikar0@linux:~$ ls -l /bin/which
-rwxr-xr-x 1 root root 946 gen 26  2016 /bin/which
ikar0@linux:~$ ls -l /usr/bin/which
lrwxrwxrwx 1 root root 10 apr 18  2017 /usr/bin/which -> /bin/which
ikar0@linux:~$ which ls 
/bin/ls
ikar0@linux:~$ which thunderbird
/usr/bin/thunderbird

steve_v
Posts: 772
Joined: 2012-10-06 05:31
Location: New Zealand
Has thanked: 2 times
Been thanked: 3 times

Re: Help ! usr/bin/thunderbird: which: Permission denied

#9 Post by steve_v »

Well that's properly bizarre, that's the only call to which in the script. I'm a bit confused as to how one can get a "permission denied" error on that if all the permissions are correct...
That it works if you're in the directory containing the script makes me think "misleading error, actually a path issue".
Have you anything strange in ~/.bashrc, ~/.profile etc? Does it work if you run in under a new user?
Last edited by steve_v on 2017-12-29 11:26, edited 1 time in total.

ikar0
Posts: 14
Joined: 2014-04-26 10:53

Re: Help ! usr/bin/thunderbird: which: Permission denied

#10 Post by ikar0 »

Can It be an apparmor problem ??

steve_v
Posts: 772
Joined: 2012-10-06 05:31
Location: New Zealand
Has thanked: 2 times
Been thanked: 3 times

Re: Help ! usr/bin/thunderbird: which: Permission denied

#11 Post by steve_v »

ikar0 wrote:Can It be an apparmor problem ??
Ahh, now that you mention it... I know SFA about apparmor. Considering what it is, I'd say it's a likely cause though. Should be easy enough to test, just stop the service and try again.

Post Reply