Summary: | www-apps/trac-0.10.4: tracd init.d don't start the daemon w/ --chuid used | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrea Bernardi <bernardi82> |
Component: | New packages | Assignee: | Julien Allanos (RETIRED) <dju> |
Status: | VERIFIED WORKSFORME | ||
Severity: | normal | CC: | jakub, uberlord |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Andrea Bernardi
2007-10-04 06:47:02 UTC
Does it work if you set TRACD_USER to tracd (or just unset this in /etc/conf.d/trac)? Also, emerge --info please. No, don't work if I set user to TRACD_USER to tracd and if I unset TRACD_USER and TRACD_GROUP. Start only without --chuid option. I list the 'emerge --info' of my local machine where also tracd don't start if I want to start with a different user (like tracd). emerge --info Portage 2.1.3.7 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.20.1 i686) ================================================================= System uname: 2.6.20.1 i686 Genuine Intel(R) CPU T2050 @ 1.60GHz Gentoo Base System release 1.12.10 Timestamp of tree: Wed, 03 Oct 2007 18:20:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p17 dev-java/java-config: 1.3.7, 2.0.31-r3 dev-lang/python: 2.4.4-r4, 2.5.1-r2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/baselayout: 1.12.10-r4 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=prescott -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=prescott -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/" LANG="it_IT@euro" LC_ALL="it_IT@euro" LINGUAS="it" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl acpi alsa amr apm arts bash-completion bitmap-fonts bzip2 cairo cdr cli cracklib crypt cscope cups dbus dio divx djvu dmi dri dvd dvdr dvdread eds emacs emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif glitz gmedia gnome gpm gstreamer gtk hal iconv ipv6 isdnlog java jpeg kde kerberos ldap libcaca mad midi mikmod mmx mozdevelop mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline real realmedia reflection ruby sdl session shout spell spl sqlite sse ssl svg tcpd threads tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs wmp wxwindows x86 xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="i810 vga vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY Reopen. Attach output of following please getent passwd tracd getent group tracd stat /var/lib/trac stat $(getent passwd trac | cut -d: -f 6) Here the output of the command: melchizedec ~ # getent passwd tracd tracd:x:106:1012:added by portage for trac:/dev/null:/sbin/nologin melchizedec ~ # getent group tracd tracd:x:1012: melchizedec ~ # stat /var/lib/trac/ File: `/var/lib/trac/' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 805h/2053d Inode: 1657873 Links: 10 Access: (0755/drwxr-xr-x) Uid: ( 106/ tracd) Gid: ( 1012/ tracd) Access: 2007-10-03 21:30:08.000000000 +0200 Modify: 2007-10-04 10:57:41.000000000 +0200 Change: 2007-10-04 10:57:58.000000000 +0200 melchizedec ~ # stat $(getent passwd tracd | cut -d: -f 6) File: `/dev/null' Size: 0 Blocks: 0 IO Block: 4096 character special file Device: dh/13d Inode: 1826 Links: 1 Device type: 1,3 Access: (0666/crw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2007-10-04 10:31:56.300863469 +0200 Modify: 2007-10-04 10:31:56.300863469 +0200 Change: 2007-10-04 10:31:57.171730613 +0200 tracd user needs a valid home dir I guess. Try setting it to /var/lib/trac This is probably not an issue with start-stop-daemon Here on my box, tracd has /dev/null as home too, and the daemon starts fine. OK, the issue could be that apache needs write access to /var/lib/trac then, which it clearly doesn't No, also if I set the home /var/lib/trac but don't start with --chuid. Maybe is caused because tracd is launched via python interpreter. Without --chuid this is result of ps aux: root 24049 0.0 0.4 8380 4920 ? S 11:36 0:00 /usr/bin/python /usr/bin/tracd -d -p 80 --env-parent-dir /var/lib/trac/ I also set tracd:tracd on permission on tracd but start always with user root. Now I do the proof on my box without apache, and search only to launch tracd with a different user. Try this su - apache /usr/bin/python /usr/bin/tracd -d -p 80 --env-parent-dir /var/lib/trac/ Then you should get a nice error message Hmmm.. maybe this is a little problem: melchizedec ~ # su - apache This account is currently not available. and also melchizedec sbin # su - tracd This account is currently not available. This is because these users have /sbin/nologin as shell. Is this a problem? Now I upgraded to the last baselayout-1.12.10-r5 to see if is a bug of start-stop-daemon but the problem persists. Also from command line how can I start tracd with a user unlike root? (In reply to comment #12) > This is because these users have /sbin/nologin as shell. No, it's not a problem, but you need a valid shell *temporarily* to be able to su - to that UID. I still can't reproduce your issue. Ok, if in your box the daemon starts fine maybe is my erroneuos configuration in some script that I haven't taken in consideration. Thank you very much for the help. I think to close the bug. So what do we do? CANTFIX? WorksForMe And reporter thinks it's a config issue on his side. I didn't try other things, but if in your box the daemon starts fine is surely a my configuration problem. I close the bug. Thanks you very much for the help. I didn't try other things, but if in your box the daemon starts fine is surely a my configuration problem. I close the bug. Thanks you very much for the help. |