1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Proper security setup for a server?

Discussion in 'Modding [KAG]' started by Eluded, May 27, 2016.

  1. Eluded

    Eluded Haxor Official Server Admin

    Messages:
    132
    So I've successfully got a server running but would like to know how to set up seclevs properly.
    What confuses me is that there is a "Security" folder in the main KAG directory, but when the game starts it seems to want to to load the security config from Base/Security. So is the right thing to do to make changes to the files in KAG/Security and then copy them over into KAG/Base/Security?
     
  2. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    no, you dont copy the security folder anywhere.
    you want to rename all the .example files to just .cfg
    before:
    [​IMG]
    after:
    [​IMG]

    then for example, if you want to add makmoud98 to the superadmin seclev, you open the superadmin.cfg file and then change it to look like
    [​IMG]

    I hope this helps you, let me know if you have anymore questions or if it doesn't work. also, sorry for the late reply. good luck.
     
    joshua12131415 likes this.
  3. Eluded

    Eluded Haxor Official Server Admin

    Messages:
    132
    Thanks for the advice Makmoud.
    I realized the .example extensions had to be removed - this is not the problem though.

    In my autoconfig.cfg file, I have the following parameter set:
    security_seclevs = Security/seclevs.cfg

    But when I start the server, it seems to be looking for Base/Security/seclevs.cfg. This line appears in the logs on start up:
    [04:13:43] Loading security levels from Base/Security/seclevs.cfg

    And nothing is loaded because the directory KAG/Base/Security does not exist. I know this because I have added myself to the superadmin file but I am not an admin when I connect to the server.

    On the other hand, if I copy the contents of KAG/Security into KAG/Base/Security - then the seclevs are correctly loaded and I am an admin when I connect.

    So what I would like is for the game to stop looking for the files in KAG/Base/Security and just look at KAG/Security. I tried changing the path to:

    security_seclevs = ../Security/seclevs.cfg
    But this didn't help.

    It's running on Linux btw.
     
  4. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    on my linux server, i have
    [​IMG]

    And they do work. I looked at my logs and it shows the same thing
    [04:13:43] Loading security levels from Base/Security/seclevs.cfg

    but i think it has nothing to do with it, because it still properly loads my seclevs. Did you actually test to see if the seclevs worked? try to set disable_seclevoutput = 0
    [​IMG]
    so that after it loads all the seclevs, you can check the logs to see if your name is in there
    here is what mine look like:
    [​IMG]
    there is more, but you get the idea
     
  5. Eluded

    Eluded Haxor Official Server Admin

    Messages:
    132
    After fiddling with things a bit your setup does seem to work for me. "disable_seclevoutput = 0" is definitely helpful for debugging, thanks Makmoud.

    @Geti log messages like this are confusing if they don't reflect what is actually happening:
    [04:13:43] Loading security levels from Base/Security/seclevs.cfg

    This should just be
    [04:13:43] Loading security levels from Security/seclevs.cfg

    In general, whenever a non-absolute file path appears is it assumed to be relative to the Base/ directory?
    If I want custom files, such as custom maps - where's the best place to put them? Currently I'm putting everything in the Mods/ directory and referring to the resources with absolute paths like
    "/blah/kag/Mods/mymap.png".
     
    makmoud98 likes this.
  6. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    yea they appear to be relative to the base folder when in realty they are relative to the kag folder. I usually put custom maps in KAG/Base/Maps or something and then just change the mapcycle.cfg files inside of the KAG/Base/Rules/whatever folder