Installation to another directory won't start : Perm denied

These are old archives. They are kept for historic purposes only.
Locked
Legistly
Posts: 5
Joined: Sat Oct 01, 2011 8:19 pm

Installation to another directory won't start : Perm denied

Post by Legistly »

Here is the relevant part of my ./configure line :

Code: Select all

--with-dpath=/root/Unreal --with-spath=/root/Unreal/src/ircd
The whole line if you are curious :

Code: Select all

./configure --with-showlistmodes --enable-nospoof --enable-hub --enable-ssl --enable-ziplinks --enable-inet6 --enable-prefixaq --with-listen=5 --with-dpath=/root/Unreal --with-spath=/root/Unreal/src/ircd --with-nick-history=2000 --with-sendq=3000000 --with-bufferpool=18 --with-hostname=irc.something.net --with-permissions=0600 --with-fd-setsize=64 --enable-dynamic-linking
I had to create /src and /ircd manually on /root/Unreal/ before being able to make install successfully.

Then when attempting to start the IRCd, I got :

Code: Select all

Starting UnrealIRCd
./unreal: 136: /root/Unreal/src/ircd: Permission denied
Possible error encountered (IRCd seemingly not started)
I tried chmod'ing /src and /ircd to 755 but that didn't work.

There is also something that shown up during ./configure that I assume shouldn't have :

Code: Select all

installing sv.gmo as /root/Unreal3.2/extras/regexp/share/locale/sv/LC_MESSAGES/tre.mo
if test "tre" = "gettext-tools"; then \
	  /bin/sh ../utils/mkinstalldirs /root/Unreal3.2/extras/regexp/share/gettext/po; \
	  for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed [email protected] [email protected] insert-header.sin Rules-quot   Makevars.template; do \
	    /usr/bin/install -c -m 644 ./$file \
			    /root/Unreal3.2/extras/regexp/share/gettext/po/$file; \
	  done; \
	  for file in Makevars; do \
	    rm -f /root/Unreal3.2/extras/regexp/share/gettext/po/$file; \
	  done; \
	else \
	  : ; \
	fi
make[1]: Leaving directory `/root/Unreal3.2/extras/tre-0.7.5/po'
I don't think it's related to my problem, but I'm pointing it out anyway.

All help will be very appreciated. Thanks.
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Installation to another directory won't start : Perm den

Post by katsklaw »

try installing Unreal as the non-root user that will be starting the ircd. There is no need to install and/or run Unreal or any other unprivileged application as a privileged user.
Legistly
Posts: 5
Joined: Sat Oct 01, 2011 8:19 pm

Re: Installation to another directory won't start : Perm den

Post by Legistly »

I did that, I still have the same issue.
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Installation to another directory won't start : Perm den

Post by katsklaw »

Legistly wrote:I did that, I still have the same issue.
Normal users can't read and write the root directory so of course you will get permission denied. What happens when you try to install it into the users directory? for example: /home/user/ircd
Legistly
Posts: 5
Joined: Sat Oct 01, 2011 8:19 pm

Re: Installation to another directory won't start : Perm den

Post by Legistly »

Code: Select all

./configure --with-showlistmodes --enable-nospoof --enable-hub --enable-ssl --enable-ziplinks --enable-inet6 --enable-prefixaq --with-listen=5 --with-dpath=/home/username/Unreal --with-spath=/home/username/Unreal/src/ircd --with-nick-history=2000 --with-sendq=3000000 --with-bufferpool=18 --with-hostname=irc.something.net --with-permissions=0600 --with-fd-setsize=128 --enable-dynamic-linking
That's what I did and it still didn't work. The same error messages were displayed but with /home/username/Unreal instead of /root/Unreal. I also had to manually create the /src/ircd directories.

Leaving it in Unreal3.2 worked. So I don't know what's wrong there.

ETA :

Code: Select all

Starting UnrealIRCd
./unreal: 136: /home/username/Unreal/src/ircd: Permission denied
Possible error encountered (IRCd seemingly not started)
=====================================================
Check above for possible errors, and this output of  
ircd.log. If you cannot solve the problem, read
Unreal.nfo on where to get support
=====================================================
tail: cannot open `/home/username/Unreal/ircd.log' for reading: No such file or directory
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Installation to another directory won't start : Perm den

Post by katsklaw »

ok
1> what is the username you are using? output from 'whoami' (no quotes)
2> do not make any directories, make install is supposed to do that
3> are you running the ./Config script?
Legistly
Posts: 5
Joined: Sat Oct 01, 2011 8:19 pm

Re: Installation to another directory won't start : Perm den

Post by Legistly »

1> I'm a bit reluctant to publish the username I use so I replaced all instances of it with "username". I ensure though that I use the right one.
2> Make install doesn't make the directories. That's why I have to make them :

Code: Select all

username@username:~/Unreal3.2$ make install
Building src
make[1]: Entering directory `/home/username/Unreal3.2/src'
cd modules; make 'CFLAGS=-I../include -I/home/username/Unreal3.2/extras/regexp/include -I/home/username/Unreal3.2/extras/c-ares/include -L../extras/c-ares/lib -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic  ' 'CC=gcc' 'IRCDLIBS=-lcrypt -lnsl  -ldl -L/home/username/Unreal3.2/extras/regexp/lib -ltre   -L/home/username/Unreal3.2/extras/c-ares/lib -lcares -lrt  ' 'LDFLAGS=' 'IRCDMODE=711' 'BINDIR=/home/username/Unreal/src/ircd' 'INSTALL=/usr/bin/install' 'INCLUDEDIR=../include' 'IRCDDIR=/home/username/Unreal' 'MANDIR=' 'RM=/bin/rm' 'CP=/bin/cp' 'TOUCH=/usr/bin/touch' 'RES=' 'SHELL=/bin/sh' 'STRTOUL=' 'CRYPTOLIB=-lssl -lcrypto' 'CRYPTOINCLUDES=' 'URL='  all
make[2]: Entering directory `/home/username/Unreal3.2/src/modules'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/username/Unreal3.2/src/modules'
make[1]: Leaving directory `/home/username/Unreal3.2/src'
 __________________________________________________ 
| Compile is now complete.                         |
| You should now read the documentation and learn  |
| how to configure your IRCd.                      |
|                                                  |
| If you really like UnrealIRCd, and would like to |
| make a donation, please read the Donation file in|
| this archive. :)                                 |
|                                                  |
| Thanks for using Unreal IRCd! If you are in need |
| for any kind of help regarding the IRCd please   |
| read the Unreal.nfo file.                        |
|__________________________________________________|
/usr/bin/install -m 0700 -d /home/username/Unreal
/usr/bin/install -m 0700 src/ircd /home/username/Unreal/src/ircd
/usr/bin/install: cannot create regular file `/home/username/Unreal/src/ircd': No such file or directory
make: *** [install] Error 1
3> I used it the first few times but it didn't make a difference.

ETA : It seems to be an old issue that was apparently fixed? http://bugs.unrealircd.org/view.php?id=3091
ETA2 : I see, it was fixed in 3.3. I'm using 3.2. I guess I'll be running it in the default directory then.
ETA3 : Thank you for your help!
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Installation to another directory won't start : Perm den

Post by katsklaw »

I should have asked what version. 3.2.8.1 is the latest release, 3.2.9-RC2 the latest development.

disclosing the username on your box is really nothing special. No one can hack your box because you use a certain name. If fact not disclosing information only hinders you because you can't receive accurate help. I've done Customer and end-users support for more than 20 years and lost count of the number of times I've heard "it's not the username .. trust me" ... and it was.

Additionally, there is no 3.3. Any 3.3 version you find is long outdated.

At any rate, glad you got it working :)
Legistly
Posts: 5
Joined: Sat Oct 01, 2011 8:19 pm

Re: Installation to another directory won't start : Perm den

Post by Legistly »

It's a matter of having stalkers... and people connecting nicknames together... sorry.
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: Installation to another directory won't start : Perm den

Post by Stealth »

My $0.02: There should be no reason to hide your username, and hiding your identity only makes the situation seem more like you're doing something that is unethical or that you don't want other people to know about (eg: botnets, box rooting, getting around installed securities on a host, etc).

So I'm just going to go ahead an lock this thread and pretend like it never existed.
Locked