'Detect permissions and service accessibility problems and provide
nicer error messages for them.'

def check_setup(self):

    s = xmlrpclib.Server(self.url_cobbler_xmlrpc)
    try:
        s.ping()
    except Exception as e:
        print >>sys.stderr, ('cobblerd    does    not    appear    to    be    running/accessible:    %s' % repr(e))
        sys.exit(411)
    s = xmlrpclib.Server(self.url_cobbler_api)
    try:
        s.ping()
    except:
        print >>sys.stderr, 'httpd    does    not    appear    to    be    running    and    proxying    cobbler,    or    SELinux    is    in    the    way.    Original    traceback:'
        traceback.print_exc()
        sys.exit(411)
    if (not os.path.exists('/var/lib/cobbler/web.ss')):
        print >>sys.stderr, 'Missing    login    credentials    file.        Has    cobblerd    failed    to    start?'
        sys.exit(411)
    if (not os.access('/var/lib/cobbler/web.ss', os.R_OK)):
        print >>sys.stderr, 'User    cannot    run    command    line,    need    read    access    to    /var/lib/cobbler/web.ss'
        sys.exit(411)
