Hi, I'm having problems running http-replicator 3.0. I've used the own emerge instructions for configuration but seems that http-replicator can't chdir to cache directory when the parameter --user portage is specified in conf.d/http-replicator. My dirty fix was removing this parameter from the config file. The permission in the directory is OK! Some output below: 1. Same startup command # /usr/bin/python /usr/bin/http-replicator -s -f --pid /var/run/http-replicator.pid --daemon --dir /var/cache/http-replicator --alias /usr/portage/packages/All:All --log /var/log/http-replicator.log --ip 90.0.0.* --port 8080 --user portage usage: http-replicator [options] http-replicator: error: invalid directory '/var/cache/http-replicator' 2. Without --user # /usr/bin/python /usr/bin/http-replicator -s -f --pid /var/run/http-replicator.pid --daemon --dir /var/cache/http-replicator --alias /usr/portage/packages/All:All --log /var/log/http-replicator.log --ip 90.0.0.* --port 8080 # 3. Permissions # ls -ld /var/cache/http-replicator/ drwxrwxr-x 2 portage portage 4096 Mar 27 17:21 /var/cache/http-replicator/ # ls -ld /var/cache drwxr-xr-x 9 root root 110 Mar 27 17:08 /var/cache # ls -ld /var drwxr-xr-x 15 root root 4096 Mar 22 21:25 /var I've also followed the instructions of creating the cache directory using repcacheman.
(In reply to comment #0) > Hi, > > I'm having problems running http-replicator 3.0. > > I've used the own emerge instructions for configuration but seems that > http-replicator can't chdir to cache directory when the parameter --user > portage is specified in conf.d/http-replicator. My dirty fix was removing this > parameter from the config file. > > The permission in the directory is OK! > > Some output below: > > 1. Same startup command > # /usr/bin/python /usr/bin/http-replicator -s -f --pid > /var/run/http-replicator.pid --daemon --dir /var/cache/http-replicator --alias > /usr/portage/packages/All:All --log /var/log/http-replicator.log --ip 90.0.0.* > --port 8080 --user portage > usage: http-replicator [options] > > http-replicator: error: invalid directory '/var/cache/http-replicator' > > 2. Without --user > # /usr/bin/python /usr/bin/http-replicator -s -f --pid > /var/run/http-replicator.pid --daemon --dir /var/cache/http-replicator --alias > /usr/portage/packages/All:All --log /var/log/http-replicator.log --ip 90.0.0.* > --port 8080 > # > > 3. Permissions > # ls -ld /var/cache/http-replicator/ > drwxrwxr-x 2 portage portage 4096 Mar 27 17:21 /var/cache/http-replicator/ > # ls -ld /var/cache > drwxr-xr-x 9 root root 110 Mar 27 17:08 /var/cache > # ls -ld /var > drwxr-xr-x 15 root root 4096 Mar 22 21:25 /var > > I've also followed the instructions of creating the cache directory using > repcacheman. > I forgot to say, the problem occurs with the correct startup script too. (/etc/init.d/http-replicator)
That's odd. Could you provide the output of emerge --info please?
Really Odd! :-) # emerge --info Portage 2.0.54 (hardened/x86/2.6, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.14-hardened-r5 i686) ================================================================= System uname: 2.6.14-hardened-r5 i686 AMD Athlon(tm) XP 2200+ Gentoo Base System version 1.6.12 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-pipe -fomit-frame-pointer -O2 -march=athlon-xp" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -fomit-frame-pointer -O2 -march=athlon-xp" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo http://www.las.ic.unicamp.br/pub/gentoo" PKGDIR="/usr/portage//packages/x86/" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.samerica.gentoo.org/gentoo-portage" USE="apache2 berkdb bzip2 crypt dlloader expat freetds gdbm gpm hardened idn imap jpeg mysql ncurses nls pam pcre perl php pic png postgres python readline samba ssl tcpd truetype udev usb userlocales x86 xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
you forgot to check ls -ld /
Here it goes: # ls -ld * drwxr-xr-x 2 root root 4096 Mar 22 18:57 bin drwxr-xr-x 3 root root 99 Mar 22 18:29 boot drwxr-xr-x 19 root root 29520 Mar 23 15:28 dev drwxr-xr-x 45 root root 4096 Mar 29 08:41 etc drwxr-xr-x 3 root root 27 Mar 27 08:12 home drwxr-xr-x 9 root root 4096 Mar 23 15:51 lib drwxr-xr-x 5 root root 56 Mar 24 07:32 mnt drwxr-xr-x 2 dnscache root 6 Mar 22 19:36 nonexistent drwxr-xr-x 2 root root 18 Jul 26 2005 opt dr-xr-xr-x 105 root root 0 Mar 23 15:27 proc drwx------ 4 root root 4096 Mar 29 09:19 root drwxr-xr-x 2 root root 4096 Mar 23 15:51 sbin drwxr-xr-x 2 root root 47 Mar 22 19:39 service drwxr-xr-x 10 root root 0 Mar 23 15:27 sys drwxrwxrwt 4 root root 4096 Mar 29 09:10 tmp drwxr-xr-x 13 root root 4096 Mar 22 13:23 usr drwxr-xr-x 15 root root 4096 Mar 22 21:25 var
you misunderstood my comment. post the output of "ls -ld /" command.
lol! Sorry about that. # ls -ld / d-wxr----t 21 root root 4096 Mar 29 09:21 / There! You nailed the problem. Solved chmoding to 755. Any clue how "/" got that permission ? Maybe the administrator was on drugs... Thank you very much!!!
I don't know why you had such permissions on root directory. From my experience, this is the most frequent cause for these kind of errors.
With those permissions, nobody other than root would be able to do anything on the system. I hope the administrator is not doing everything as root?
I agree, but besides http-replicator, this server has mysql, postgres, apache and its running smoothly, chrooting and set_uid()ing correctly... But, thanks ! :)