Mailing List Archive

conserver RUNAS=conservr ERROR: Master(): bind(782): Permission denied
It seems everything works fine as a root. I wanted to test to run as
"conservr" user.
so I have created user and changed permission of /var/log/conserver and
/var/log/consoles/
but conserver still gets terminated with error "ERROR: Master(): bind(782):
Permission denied"



# cat /etc/default/conserver
# server options
#OPTIONS="-p 33000 -d"
# run as different user that root
RUNAS=conservr


# id conservr
uid=4215(conservr) gid=500(user) groups=500(user)


#chown root:user /var/log/conserver
#chown root.user /var/log/consoles/ -R
#chmod 775 /var/log/consoles/
#chmod 664 /var/log/consoles/*
#chmod g+s /var/log/console


#ls -ld /var/log/conserver
-rw-rw-r--. 1 root user 8008 Apr 7 11:54 /var/log/conserver


[root@conservertest ~]# ls -ld /var/log/consoles/
drwxrwxr-x. 2 root user 4096 Apr 3 14:12 /var/log/consoles/
[root@conservertest ~]# ls -l /var/log/consoles/
total 12
-rw-rw-r--. 1 root user 3815 Apr 7 11:54 goose
-rw-rw-r--. 1 root user 1425 Apr 7 11:54 pimpernel
-rw-rw-r--. 1 root user 828 Apr 3 11:06 shrimp



Starting conserver: [Tue Apr 7 11:54:44 2015] conserver (7262):
conserver.com version 8.2.0
[Tue Apr 7 11:54:44 2015] conserver (7262): started as `conservr' by
`ym2531'
[Tue Apr 7 11:54:44 2015] conserver (7262): warning: running as a non-root
user - any shadow password usage will most likely fail!
[Tue Apr 7 11:54:44 2015] conserver (7262): daemonizing


# tail /var/log/conserver
[Tue Apr 7 11:53:36 2015] conserver (7237): ERROR: Master(): bind(782):
Permission denied
[Tue Apr 7 11:53:36 2015] conserver (7237): terminated
[Tue Apr 7 11:54:44 2015] conserver (7263): conserver.com version 8.2.0
[Tue Apr 7 11:54:44 2015] conserver (7263): started as `conservr' by
`ym2531'
[Tue Apr 7 11:54:44 2015] conserver (7264): [pimpernel] initcmd started:
pid 7266
[Tue Apr 7 11:54:44 2015] conserver (7264): [goose] initcmd started: pid
7267
[Tue Apr 7 11:54:44 2015] conserver (7264): [pimpernel] initcmd
terminated: pid 7266
[Tue Apr 7 11:54:45 2015] conserver (7264): [goose] initcmd terminated:
pid 7267
[Tue Apr 7 11:54:45 2015] conserver (7263): ERROR: Master(): bind(782):
Permission denied
[Tue Apr 7 11:54:45 2015] conserver (7263): terminated


If anybody runs their conserver other then root and would like to know if
my permission should be different

Thanks so much in advance

Best regards,
Yash
Re: conserver RUNAS=conservr ERROR: Master(): bind(782): Permission denied [ In reply to ]
You'll need to use the -p option to bind to a port number 1024 or greater. Only root can bind to ports below that. Your console client will need to use the same option to connect to the server at that point (or you rebuild from source with a port other than 782 so both client and server match). There are other tricky ways to get around the restriction as well...a favorite search engine should find the options.

Bryan

> On Apr 7, 2015, at 10:14 AM, Yash Menpara <solarmitra@gmail.com> wrote:
>
> It seems everything works fine as a root. I wanted to test to run as "conservr" user.
> so I have created user and changed permission of /var/log/conserver and /var/log/consoles/
> but conserver still gets terminated with error "ERROR: Master(): bind(782): Permission denied"
>


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: conserver RUNAS=conservr ERROR: Master(): bind(782): Permission denied [ In reply to ]
Bryan,

I read it couple of time when I build rpm and yet I still skipped that port
number part.

Thank you for your quick help.

Yash


On Wed, Apr 8, 2015 at 1:44 AM, Bryan Stansell <bryan@conserver.com> wrote:

> You'll need to use the -p option to bind to a port number 1024 or
> greater. Only root can bind to ports below that. Your console client will
> need to use the same option to connect to the server at that point (or you
> rebuild from source with a port other than 782 so both client and server
> match). There are other tricky ways to get around the restriction as
> well...a favorite search engine should find the options.
>
> Bryan
>
> > On Apr 7, 2015, at 10:14 AM, Yash Menpara <solarmitra@gmail.com> wrote:
> >
> > It seems everything works fine as a root. I wanted to test to run as
> "conservr" user.
> > so I have created user and changed permission of /var/log/conserver and
> /var/log/consoles/
> > but conserver still gets terminated with error "ERROR: Master():
> bind(782): Permission denied"
> >
>
>
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
>