Summary: | net-im/ejabberd: dirs under /var being created with inappropriate ownership | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Marko Cupać <marko.cupac> | ||||
Component: | Individual Port(s) | Assignee: | Ashish SHUKLA <ashish> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | Flags: | ashish:
maintainer-feedback-
|
||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Marko Cupać
2015-06-15 12:37:44 UTC
(In reply to Marko Cupać from comment #0) Hi Marko, I've fixed a similar issue sometime ago in r381868[1]. The permissions are being set in pkg-install script of the port. To figure out your issue, I'll need following information from your side: 1. Output of: make -C /usr/ports/net-im/ejabberd -V PKGNAME 2. Output of: uname -a 3. Command-line steps on how to reproduce the issue. References: [1] https://svnweb.freebsd.org/ports?view=revision&revision=381868 Thanks, Ashish (In reply to Ashish SHUKLA from comment #1) I am building in poudriere, so /usr/ports is actually a symlink: /usr/ports -> /usr/local/poudriere/ports/default Here are answers to your questions: pacija@pkg:~ % make -C /usr/ports/net-im/ejabberd -V PKGNAME ejabberd-15.04 pacija@pkg:~ % uname -a FreeBSD pkg.mimar.rs 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May 13 06:54:13 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 As I build with poudriere, I guess you need information about jail which builds ejabberd: pacija@pkg:~ % sudo poudriere jail -j 101amd64 -i Jail name: 101amd64 Jail version: 10.1-RELEASE-p10 Jail arch: amd64 Jail method: ftp Jail mount: /usr/local/poudriere/jails/101amd64 Jail fs: pkg/poudriere/jails/101amd64 Jail updated: 2015-05-14 09:40:42 Tree name: default Tree method: portsnap My ownerships are set as follows: pacija@xmpp:/var/run % ls -lh | grep ejab drwxr-x--- 2 ejabberd ejabberd 512B Jun 20 00:01 ejabberdctl pacija@xmpp:/var/spool % ls -lh | grep ejab drwxr-x--- 2 ejabberd ejabberd 512B Jun 19 18:39 ejabberd pacija@xmpp:/var/log % ls -lh | grep ejab drwxr-x--- 2 ejabberd ejabberd 512B Jun 19 00:45 ejabberd After reinstalling with 'pkg install -f net-im/ejabberd' ownership is reset on /var/run/ejabberdctl: pacija@xmpp:/var/run % ls -lh | grep ejab drwxr-x--- 2 root wheel 512B Jun 10 09:30 ejabberdctl /var/spool/ejabberd and /var/log/ejabberd preserve their ownership (contrary to what I originally said): pacija@xmpp:/var/spool % ls -lh | grep ejab drwxr-x--- 2 ejabberd ejabberd 512B Jun 10 09:30 ejabberd pacija@xmpp:/var/log % ls -lh | grep ejab drwxr-x--- 2 ejabberd ejabberd 512B Jun 10 09:30 ejabberd Because of /var/run/ejabberdctl's ownership being reset to root:wheel, ejabberd won't start, and it throws the following message in ejabberd.log: 2015-06-19 22:24:04.146 [info] <0.7.0> Application lager started on node 'ejabberd@xmpp.mimar.rs' 2015-06-19 22:24:04.146 [error] <0.37.0>@ejabberd_app:write_pid_file:222 Cannot write PID file /var/run/ejabberdctl/ejabberd.pid Reason: eacces 2015-06-19 22:24:04.147 [error] <0.36.0> CRASH REPORT Process <0.36.0> with 0 neighbours exited with reason: bad return value {cannot_write_pid_file,"/var/run/ejabberdctl/ejabberd.pid",eacces} from ejabberd_app:start(normal, []) in application_master:init/4 line 133 2015-06-19 22:24:04.148 [info] <0.7.0> Application ejabberd exited with reason: bad return value {cannot_write_pid_file,"/var/run/ejabberdctl/ejabberd.pid",eacces} from ejabberd_app:start(normal, []) After giving ownership of /var/run/ejabberdctl to ejabberd:ejabberd, killing epmd process and restarting ejabberd with 'service ejabberd start', ejabberd starts and works fine. I apologize for giving incorrect information originally. It appears that only /var/run/ejabberdctl's ownership is being reset. However, this alone results in need for manual chown after every install/upgrade. Thank you for looking into it, I'd be glad to do some more tests if needed. Created attachment 157892 [details] diff to fix the problem (In reply to Marko Cupać from comment #2) > After giving ownership of /var/run/ejabberdctl to ejabberd:ejabberd, killing epmd process and restarting ejabberd with 'service ejabberd start', ejabberd starts and works fine. > I apologize for giving incorrect information originally. It appears that only /var/run/ejabberdctl's ownership is being reset. However, this alone results in need for manual chown after every install/upgrade. No worries. > Thank you for looking into it, I'd be glad to do some more tests if needed. Thanks for reporting the issue. Could you please try the attached diff, and see if it fixes the issue for you ? Sorry for the inconvenience. Thanks! (In reply to Ashish SHUKLA from comment #3) That fixed it. Thanx! A commit references this bug: Author: ashish Date: Mon Jun 22 15:53:49 UTC 2015 New revision: 390299 URL: https://svnweb.freebsd.org/changeset/ports/390299 Log: - Fix permissions on /var/run/ejabberdctl, missed from r381868 PR: 200871 Changes: head/net-im/ejabberd/Makefile head/net-im/ejabberd/files/pkg-install.in This should be fixed now. Thanks for the report. |