Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608120 - x11-wm/xpra-1.0.1 fails to start due to permission error
Summary: x11-wm/xpra-1.0.1 fails to start due to permission error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Weber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-03 12:30 UTC by kavol
Modified: 2017-03-09 17:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2017-02-03 12:30:00 UTC
SSIA, trying to run `xpra start :100`, the server doesn't start and the log says:

xpra initialization error:
 socket path error: [Errno 13] Permission denied: '/run/xpra'
2017-02-03 13:08:19,644 killing xvfb with pid 8633

note that there is the configfile /usr/lib/tmpfiles.d/xpra.conf, but it uses the '/var' prefix:

$ cat /usr/lib/tmpfiles.d/xpra.conf
# This is the shared directory where users of the xpra group
# can place sockets if they want to be able to share them.
d /var/run/xpra 0775 - xpra


however changing '/var/run/xpra' to '/run/xpra' to match the path doesn't have any influence - and to my best knowledge, this is correct, because tmpfiles.d is systemd's stuff, and such file shouldn't be even installed at all with USE=-systemd

doing

# mkdir /run/xpra
# chmod 777 /run/xpra

works around the issue and xpra seems to run just fine
Comment 1 kavol 2017-02-03 12:35:17 UTC
re https://bugs.gentoo.org/show_bug.cgi?id=606898#c4

- this wasn't necessary before and I haven't found any docs mentioning that

because it is behaviour change between versions, I'd suggest adding einfo message to the ebuild

other than that, it could be mentioned at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Finalizing#Adding_a_user_for_daily_use - or better, that page should link some more comprehensive list of groups, e.g. on Gentoo Wiki - but searching for xpra on that wiki doesn't yield any useful results
Comment 2 kavol 2017-02-03 12:44:41 UTC
hm, being member of 'xpra' doesn't help either -

$ groups
lp wheel audio cdrom video games usb users xpra lpadmin portage kavol
$ xpra start :100
/usr/bin/Xorg is suid and not readable, Xdummy support unavailable
Entering daemon mode; any further errors will be reported to:
  /home/kavol/.xpra/:100.log
$ cat /home/kavol/.xpra/:100.log
xpra initialization error:
 socket path error: [Errno 13] Permission denied: '/run/xpra'
2017-02-03 13:34:31,706 killing xvfb with pid 9240


not to have it world writable, doing:

# mkdir /run/xpra
# chown :xpra /run/xpra
# chmod g+w /run/xpra

is enough to workaround this time
Comment 3 Michael Weber (RETIRED) gentoo-dev 2017-02-03 13:19:24 UTC
(In reply to kavol from comment #2)
> $ xpra start :100
> /usr/bin/Xorg is suid and not readable, Xdummy support unavailable
> Entering daemon mode; any further errors will be reported to:
>   /home/kavol/.xpra/:100.log
^^ no error so far

> $ cat /home/kavol/.xpra/:100.log
> xpra initialization error:
>  socket path error: [Errno 13] Permission denied: '/run/xpra'
> 2017-02-03 13:34:31,706 killing xvfb with pid 9240
sure that's a current message? that file gets appended every invocation.
Comment 4 kavol 2017-02-03 13:37:03 UTC
(In reply to Michael Weber from comment #3)
> > $ cat /home/kavol/.xpra/:100.log
> > xpra initialization error:
> >  socket path error: [Errno 13] Permission denied: '/run/xpra'
> > 2017-02-03 13:34:31,706 killing xvfb with pid 9240
> sure that's a current message?

yes, before retrying with the new group, I've removed ~/.xpra

> that file gets appended every invocation.

not sure ... looks like it rather gets renamed to :100.log.old and new :100.log is created
Comment 5 Michael Weber (RETIRED) gentoo-dev 2017-03-09 17:43:05 UTC
Hi, I could debug the problem during keywording for ppc64 on a fresh install.

The relevant tmpfiles.d file is at /usr/lib/tmpfiles.d/xpra.conf

The context referred to /var/run/xpra, which is symlinked, ... I fixed that to ${EROOT}runxpra.

And the file didn't get activated in pkg_postinst, I fixed that.

__BUT__, the tmpfiles.d mechanism only acts, if the dir/files not already exist.

So, if you had run xpra and /run/xpra root.root 0600 exists, this is not fixed by the tmpfiles.d invocation.

(you can remove /run/xpra and re-emerge or run tmpfiles --create --verbose)