You are not logged in.

#1 2020-08-31 14:26:43

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

[Solved] Microsoft teams won't run correctly unless started as root

I'm trying to get microsoft teams to work on my machine.
The test call (settings -> devices -> Make a test call) works when I start teams as root (sudo teams), but won't connect when run normally (Stuck on the ringer sound).

This is obviously a permission issue, but how do I find out which permissions my user is missing?

Last edited by F43nd1r (2020-09-01 22:17:50)

Offline

#2 2020-08-31 14:36:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,416

Re: [Solved] Microsoft teams won't run correctly unless started as root

Sounds like an issue with sound card access. Systemd should provide you with proper permissions if you initialize your session correctly, how do you start your session/xorg?

What's your output of

sudo fuser -v /dev/snd/*
#And while we are already in ran applications as root that shouldn't be territory...
stat $HOME $HOME/.config  $HOME/.config/teams #If any of these errors out due to insufficient permissions you have a problem and will want to instead post these same outputs with $HOME replaced with your actual user home but with sudo

Last edited by V1del (2020-08-31 14:37:42)

Offline

#3 2020-09-01 11:01:30

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

Re: [Solved] Microsoft teams won't run correctly unless started as root

V1del wrote:

Sounds like an issue with sound card access. Systemd should provide you with proper permissions if you initialize your session correctly, how do you start your session/xorg?

SDDM with autologin into KDE

V1del wrote:

What's your output of

sudo fuser -v /dev/snd/*
$ sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  lukas      1024 F.... pulseaudio
                     lukas      9981 F.... pipewire-media-
/dev/snd/controlC1:  lukas      1024 F.... pulseaudio
                     lukas      9981 F.... pipewire-media-
/dev/snd/controlC2:  lukas      1024 F.... pulseaudio
                     lukas      9981 F.... pipewire-media-
/dev/snd/pcmC2D0p:   lukas      1024 F...m pulseaudio
/dev/snd/seq:        lukas      9979 F.... pipewire
/dev/snd/timer:      lukas      1024 f.... pulseaudio
V1del wrote:
#And while we are already in ran applications as root that shouldn't be territory...
stat $HOME $HOME/.config  $HOME/.config/teams #If any of these errors out due to insufficient permissions you have a problem and will want to instead post these same outputs with $HOME replaced with your actual user home but with sudo
$ stat $HOME $HOME/.config  $HOME/.config/teams
  File: /home/lukas
  Size: 12288           Blocks: 24         IO Block: 4096   directory
Device: 803h/2051d      Inode: 9437185     Links: 103
Access: (0777/drwxrwxrwx)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 16:14:53.327346795 +0200
Modify: 2020-08-31 17:03:28.433860464 +0200
Change: 2020-08-31 17:03:28.433860464 +0200
 Birth: 2018-02-04 04:25:49.331312946 +0100
  File: /home/lukas/.config
  Size: 12288           Blocks: 24         IO Block: 4096   directory
Device: 803h/2051d      Inode: 9575941     Links: 91
Access: (0755/drwxr-xr-x)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 17:03:18.767242606 +0200
Modify: 2020-09-01 12:57:26.629802771 +0200
Change: 2020-09-01 12:57:26.629802771 +0200
 Birth: 2018-02-04 04:29:45.845513536 +0100
  File: /home/lukas/.config/teams
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 803h/2051d      Inode: 9580216     Links: 4
Access: (0700/drwx------)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 17:03:20.080569312 +0200
Modify: 2020-07-03 13:29:33.648631482 +0200
Change: 2020-07-03 13:29:33.648631482 +0200
 Birth: 2020-07-03 13:29:33.641964883 +0200

Offline

#4 2020-09-01 14:16:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,418

Re: [Solved] Microsoft teams won't run correctly unless started as root

Works out of the box here with several different system configurations.  It works in i3 with startx, it works in Gnome in Wayland started from a command line, and it works in Gnome started from gdm.

When you ran it as root, were you logged in as root? or did you use sudo ?   If the former, you may have configuration and cache files sprinkled around in $HOME that relate to teams that are now owned by root that you do not have permission to change.  You need to find them and excise them.

May I ask why you thought it a good plan to run an enormously complex piece of code with video, graphics, access to your screen and files and tightly coupled to the Internet as root?  Especially one that is closed source? By Microsoft?   Did you think that is safe?

Last edited by ewaller (2020-09-01 14:17:09)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2020-09-01 14:42:54

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

Re: [Solved] Microsoft teams won't run correctly unless started as root

ewaller wrote:

Works out of the box here with several different system configurations.  It works in i3 with startx, it works in Gnome in Wayland started from a command line, and it works in Gnome started from gdm.

I'm using sddm, xorg and kde. I also want make myself clear: The software itself runs, but I cannot join calls. To test that I used the test call functionality.

ewaller wrote:

When you ran it as root, were you logged in as root? or did you use sudo ?   If the former, you may have configuration and cache files sprinkled around in $HOME that relate to teams that are now owned by root that you do not have permission to change.  You need to find them and excise them.

I did use sudo, as stated in my first post. I also did start it normally first, so any files created should be under my users control.

ewaller wrote:

May I ask why you thought it a good plan to run an enormously complex piece of code with video, graphics, access to your screen and files and tightly coupled to the Internet as root?  Especially one that is closed source? By Microsoft?   Did you think that is safe?

I am aware that this is not ideal. I would like to run it with normal user permissions, which is why I created this post. However, Teams is required for me to work.

Offline

#6 2020-09-01 14:49:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,418

Re: [Solved] Microsoft teams won't run correctly unless started as root

Any kind of firewall set up on your machine or your router?    Any chance a port is being blocked?
https://docs.microsoft.com/en-us/micros … 20services.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2020-09-01 14:51:38

icar
Member
Registered: 2020-07-31
Posts: 13

Re: [Solved] Microsoft teams won't run correctly unless started as root

F43nd1r wrote:
$ stat $HOME $HOME/.config  $HOME/.config/teams
  File: /home/lukas
  Size: 12288           Blocks: 24         IO Block: 4096   directory
Device: 803h/2051d      Inode: 9437185     Links: 103
Access: (0777/drwxrwxrwx)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 16:14:53.327346795 +0200
Modify: 2020-08-31 17:03:28.433860464 +0200
Change: 2020-08-31 17:03:28.433860464 +0200
 Birth: 2018-02-04 04:25:49.331312946 +0100
  File: /home/lukas/.config
  Size: 12288           Blocks: 24         IO Block: 4096   directory
Device: 803h/2051d      Inode: 9575941     Links: 91
Access: (0755/drwxr-xr-x)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 17:03:18.767242606 +0200
Modify: 2020-09-01 12:57:26.629802771 +0200
Change: 2020-09-01 12:57:26.629802771 +0200
 Birth: 2018-02-04 04:29:45.845513536 +0100
  File: /home/lukas/.config/teams
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 803h/2051d      Inode: 9580216     Links: 4
Access: (0700/drwx------)  Uid: ( 1000/   lukas)   Gid: ( 1000/   lukas)
Access: 2020-08-31 17:03:20.080569312 +0200
Modify: 2020-07-03 13:29:33.648631482 +0200
Change: 2020-07-03 13:29:33.648631482 +0200
 Birth: 2020-07-03 13:29:33.641964883 +0200

Your /home/lukas/.config/teams directory has different permissions than .config. I'd start by changing them to 755.
Also, if you need this for work, you could try running the flatpak version of Teams.

Last edited by icar (2020-09-01 15:08:00)

Offline

#8 2020-09-01 15:16:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,416

Re: [Solved] Microsoft teams won't run correctly unless started as root

While the directory permissions are definitely wrong that shouldn't be an inherent issue. Do you knowingly need/use pipewire? Potentially a conflict to which it intends to connect, try a

systemctl --user stop pipewire.{service,socket}

Offline

#9 2020-09-01 15:59:04

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

Re: [Solved] Microsoft teams won't run correctly unless started as root

icar wrote:

Your /home/lukas/.config/teams directory has different permissions than .config. I'd start by changing them to 755.

Did that, changed nothing.

icar wrote:

Also, if you need this for work, you could try running the flatpak version of Teams.

Good call, the flatpak version does work.

V1del wrote:

Do you knowingly need/use pipewire?

pipewire is not installed on my system.

Offline

#10 2020-09-01 21:06:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,416

Re: [Solved] Microsoft teams won't run correctly unless started as root

Pipewire is installed in your system, the fuser output confirms that. And it's a hard dep of a few packages you might have installed (speaking of flatpak that's where that's from at the very least).

You basically have the same issue/resolution as forcing via sudo (i.e. you're ignoring the general permissions/state of your user session), just with less potential for catastrophe compared to running it as root. If you feel this is resolved that way please mark the thread as [SOLVED].

Offline

#11 2020-09-01 22:17:31

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

Re: [Solved] Microsoft teams won't run correctly unless started as root

V1del wrote:

Pipewire is installed in your system, the fuser output confirms that. And it's a hard dep of a few packages you might have installed (speaking of flatpak that's where that's from at the very least).

yeah i probably forgot the --user flag or something when I checked for it.

V1del wrote:

You basically have the same issue/resolution as forcing via sudo (i.e. you're ignoring the general permissions/state of your user session), just with less potential for catastrophe compared to running it as root. If you feel this is resolved that way please mark the thread as [SOLVED].

Eh, not really satisfied with the solution "don't use the aur", but I guess if it works it works.
If you do know how I could find out what exactly is wrong with my system, let me know.

Offline

#12 2020-09-01 22:53:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,416

Re: [Solved] Microsoft teams won't run correctly unless started as root

During a non flatpak attempt (I somewhat remember teams has a log file somewhere but i didn't find it on an initial search , but would be neat to know what it tries to do) ... FWIW you mention that the "call" operation doesn't connect properly? As in you can actually hear the sound but it doesn't establish connection? Do you use any proxy/firewall/firejail/$insertsandbox that could affect connection building for the teams process if ran in the context of your user? I'd assume something is wonky in your environment, check/post a

printenv

which would make sense in so far that large parts of your environment won't be shared by sudo/flatpak by default.

Offline

#13 2020-09-01 23:18:06

F43nd1r
Member
Registered: 2019-09-04
Posts: 30

Re: [Solved] Microsoft teams won't run correctly unless started as root

V1del wrote:

FWIW you mention that the "call" operation doesn't connect properly? As in you can actually hear the sound but it doesn't establish connection?

Correct, I get a sound as if the other person didn't pick up the phone, but the bot should respond near instantly  (that sound continues forever, and if I hang up and try again, the application sometimes freezes)

V1del wrote:

Do you use any proxy/firewall/firejail/$insertsandbox that could affect connection building for the teams process if ran in the context of your user?

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
LIBVIRT_INP  all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DOCKER-USER  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-1  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
LIBVIRT_FWX  all  --  anywhere             anywhere            
LIBVIRT_FWI  all  --  anywhere             anywhere            
LIBVIRT_FWO  all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
LIBVIRT_OUT  all  --  anywhere             anywhere            

Chain DOCKER (2 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination         
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
DOCKER-ISOLATION-STAGE-2  all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-ISOLATION-STAGE-2 (2 references)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            
RETURN     all  --  anywhere             anywhere            

Chain DOCKER-USER (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain LIBVIRT_FWI (1 references)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain LIBVIRT_FWO (1 references)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain LIBVIRT_FWX (1 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            

Chain LIBVIRT_INP (1 references)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps

Chain LIBVIRT_OUT (1 references)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootpc

looks normal enough to me, but I'm not very good with iptables. I do not use any dedicated fire-something afaik and certainly no proxy.

V1del wrote:

check/post a printenv

$ printenv
SHELL=/bin/bash
SESSION_MANAGER=local/xxx:@/tmp/.ICE-unix/968,unix/xxx:/tmp/.ICE-unix/968
WINDOWID=90177543
COLORTERM=truecolor
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
LANGUAGE=en_DE:C
THEFUCK_INSTANT_MODE=True
JAVA_HOME=/usr/lib/jvm/java-14-openjdk
SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket
GRADLE_HOME=/usr/share/java/gradle
SHELL_SESSION_ID=xxx
DESKTOP_SESSION=/usr/share/xsessions/plasma
LC_MONETARY=en_DE.UTF-8
GTK_RC_FILES=/etc/gtk/gtkrc:/home/lukas/.gtkrc:/home/lukas/.config/gtkrc
XCURSOR_SIZE=24
EDITOR=gedit
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/home/lukas
LOGNAME=lukas
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_TYPE=x11
XAUTHORITY=/home/lukas/.Xauthority
ftp_proxy=
MOTD_SHOWN=pam
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/lukas/.gtkrc-2.0:/home/lukas/.config/gtkrc-2.0
HOME=/home/lukas
LANG=en_DE.UTF-8
ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=KDE
KONSOLE_DBUS_SERVICE=:1.74
KONSOLE_DBUS_SESSION=/Sessions/2
PROFILEHOME=
ORACLE_HOME=/usr/lib/oracle/product/11.2.0/xe
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
https_proxy=
KONSOLE_VERSION=200800
socks_proxy=
KDE_SESSION_UID=1000
XDG_SESSION_CLASS=user
TERM=xterm-256color
USER=lukas
SUDO_EDITOR=kate
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
COLORFGBG=15;0
KDE_SESSION_VERSION=5
VISUAL=gedit
DISPLAY=:0
SHLVL=2
ANDROID_SDK_ROOT=/opt/android-sdk/
LC_MESSAGES=en_DE.utf8
LC_MEASUREMENT=en_DE.UTF-8
XDG_VTNR=1
XDG_SESSION_ID=1
http_proxy=
ORACLE_SID=XE
LC_CTYPE=en_DE.utf8
THEFUCK_OUTPUT_LOG=/tmp/thefuck-script-log-e97102bc484e4b40a763311ee3fd8bc2
XDG_RUNTIME_DIR=/run/user/1000
\[\e]0;\u@\h \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w \$\[\033[00m\] 
LC_TIME=en_DE.UTF-8
QT_AUTO_SCREEN_SCALE_FACTOR=0
XCURSOR_THEME=breeze_cursors
XDG_DATA_DIRS=/home/lukas/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
KDE_FULL_SESSION=true
PATH=/usr/lib/oracle/product/11.2.0/xe/bin:/home/lukas/.gem/ruby/2.6.0/bin:/home/lukas/bin:/home/lukas/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/lib/oracle/product/11.2.0/xe/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
KDE_APPLICATIONS_AS_SCOPE=1
HG=/usr/bin/hg
MAIL=/var/spool/mail/lukas
_JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=on
LC_NUMERIC=en_DE.UTF-8
KONSOLE_DBUS_WINDOW=/Windows/1
_=/usr/bin/printenv

Offline

Board footer

Powered by FluxBB