Opened at 2012-02-11T09:29:28Z
Last modified at 2015-10-31T11:44:15Z
#914 assigned defect
OTR cannot write its config file
Reported by: | anonymous | Owned by: | wilmer |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OTR | Version: | devel |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | Linux |
OS version/distro: | Xubuntu 11.04 x86 |
Description
With the build checked out from bzr a few hours ago, registration fails because of OTR permission issues:
$ ./configure --otr=1
...
$ bitlbee -D
[...meanwhile, in XChat...]
<Rena> register hunter2
<root> Error while opening configuration file.
<root> otr save: /var/lib/bitlbee/Rena.otr_fprints: Permission denied
<root> Error registering
This is only after creating said file; the install process didn't even create /var/lib/bitlbee (so it would fail with a "no such file or directory" message instead). I can't seem to find any permission set which will allow it to successfully write this file; even with the owner set as the same user running bitlbee and mode 777, I still get "permission denied". This makes OTR unusable.
Attachments (0)
Change History (7)
comment:1 Changed at 2012-02-11T09:56:12Z by
comment:2 Changed at 2012-02-16T15:15:00Z by
I downloaded from BZR and compiled. On another system (where OTR works fine) I installed from Ubuntu repos.
comment:3 follow-up: 5 Changed at 2014-02-07T16:15:20Z by
Owner: | changed from pesco to wilmer |
---|---|
Status: | new → assigned |
I don't know, should make install
create /var/lib/bitlbee
if needed? I'd guess so, but it's not really my department.
comment:4 Changed at 2014-02-07T19:54:26Z by
EDIT: these issues below are definitely because of xmlconsole. Please ignore
Oh, you just reminded me, in the tests I did yesterday I got several ugly bugs with the libotr4 bitlbee, but I didn't have /var/lib/bitlbee and sometimes i had xmlconsole on too. I blamed /var/lib/bitlbee for both of them, but now I'm not sure of that. Will check later.
First it starts like this:
otr: dx@dukgo.com/jabber: otrl_instag_generate failed: No such file or directory
Which is the only part I'm completely sure that it's relevant to this ticket.
After that, I kept using bitlbee, and got a stack overflow - infinite recursion between a few functions, but unfortunately I didn't have full debug symbols when I got this one.
#48 0x00007f1628ffda25 in otr_filter_msg_in () #49 0x00007f1628ff6cf7 in ?? () #50 0x00007f162901b6de in jabber_write () #51 0x00007f1627c9bfe1 in ?? () from /usr/lib/libotr.so.5 #52 0x00007f1627c9e0ff in otrl_message_receiving () from /usr/lib/libotr.so.5 #53 0x00007f1628ffda25 in otr_filter_msg_in () #54 0x00007f1628ff6cf7 in ?? () #55 0x00007f162901b6de in jabber_write () #56 0x00007f1627c9c709 in ?? () from /usr/lib/libotr.so.5 #57 0x00007f1627c9cb8e in ?? () from /usr/lib/libotr.so.5 #58 0x00007f1627c9ddd5 in otrl_message_receiving () from /usr/lib/libotr.so.5 #59 0x00007f1628ffda25 in otr_filter_msg_in ()
After that I reconnected, talked to a contact, and started receiving notices with this repeated every second:
OTR error message received: you sent a malformed OTR message
While the other side (also bitlbee libotr4) got
unexpected encrypted message received
Also "otr disconnect <nickname>" failed silently.
Like I said, I'm not completely sure if these issues are because of the lack of /var/lib/bitlbee. Must confirm again. Just dumping stuff here, probably the wrong place for that, but I'll forget otherwise.
comment:5 follow-up: 6 Changed at 2014-02-07T20:53:34Z by
Replying to pesco:
I don't know, should
make install
create/var/lib/bitlbee
if needed? I'd guess so, but it's not really my department.
I don't think it should, since it also doesn't know what user BitlBee is going to run as. People who compile BitlBee from source should be able to read manuals. If they're not, they should install packages or use a public server..
comment:6 follow-up: 7 Changed at 2014-02-07T21:40:42Z by
Replying to wilmer:
People who compile BitlBee from source should be able to read manuals. If they're not, they should install packages or use a public server..
Should. Evidently they don't, as it's a really frequent issue in #bitlbee.
Speaking of which: I didn't even know doc/README existed (I usually look for README files in the root of a repo). That file only says this in the xinetd section (marked as deprecated):
don't forget to create the configuration directory
And this in the (fork)daemon section:
Please do make sure that the user BitlBee runs as (not root, please!) is able to read from and write to the /var/lib/bitlbee directory to save your settings!
But back to the original point, evidently nobody reads the docs. Maybe the bitlbee process should refuse to start if it doesn't have write access to the config dir? Also we need better log messages when write access is possible but individual files have wrong permissions.
comment:7 Changed at 2014-02-07T22:46:44Z by
Definitely in favour of better error logging. I think there's a warning printed when /v/l/b doesn't exist but obviously that's easy to miss.
Still strongly again creating the directory without thinking about permissions, since that will just change that FAQ from "missing /v/l/b" into "wrong permissions on /v/l/b".
Which installation process? I assume you installed BitlBee packages from your distro or code.bitlbee.org/debian/ ?