# Permissions

> Configure ACE-backed administrator access for Sky Fire Job commands and protected features.

<warning>

**Admin command not working?** Make sure the [bootstrap ACEs](/docs/installation#permissions-bootstrap) are present in your `server.cfg` and your player is in `group.admin`. Sky wires every per-command permission to ACE automatically.

</warning>

## First administrator

Put this before the Sky `ensure` lines in `server.cfg`:

```cfg
add_ace resource.sky_base command.add_ace allow
```

Then assign your administrator through your framework's existing admin tooling, or grant the appropriate principal as shown below. Apply `server.cfg` changes with a full server restart, reconnect, and test `/jobconfig` and `/missioncreator` in game.

Administrator access opens setup tools. Firefighter job membership, duty status and employee/boss permissions control ordinary gameplay separately. Giving someone administrator access does not assign them a firefighter job.

## How Sky checks command permissions

Administrator commands and protected features are gated by `Config.CommandPermissions` in `sky_firejob/config/config.lua`. At server start, `sky_base` grants two ACE objects per command and group: `command.<command>` for FiveM's restricted command gate and `sky_firejob.<command>` for the resource's runtime permission check.

```lua [sky_firejob/config/config.lua]
Config.CommandPermissions = {
    skyfire = { "god", "superadmin", "admin" },
    skyfiremenu = { "god", "superadmin", "admin" },
    skyfirestop = { "god", "superadmin", "admin" },
    skyfirestopnear = { "god", "superadmin", "admin" },
    skyfireclear = { "god", "superadmin", "admin" },
    skyfirelist = { "god", "superadmin", "admin" },
    skyfiredebug = { "god", "superadmin", "admin" },
    skyfiredecal = { "god", "superadmin", "admin" },
    missioncreator = { "god", "superadmin", "admin" },
}
```

The shared `/jobconfig` and `/setboss` commands are configured separately through their matching
entries in `sky_jobs_base/config/config.lua`.

For the snippet above, `sky_base` creates permissions such as:

```cfg
add_ace group.god command.skyfire allow
add_ace group.god sky_firejob.skyfire allow
… both objects for every configured command and group
```

FiveM checks the native command object first; protected resource logic then checks `sky_firejob.<command>`.

If a command is not listed in `Config.CommandPermissions`, only the server console can use it.

## Framework setup

### QBox

```cfg [server.cfg]
add_principal identifier.license:<license> group.admin
```

### QBCore

```cfg [server.cfg]
add_principal identifier.license:<license> qbcore.admin
```

Or, if an existing administrator is already online:

```text
/addpermission 1 god
```

### ESX Legacy

```text
/setgroup 1 admin
```

### vRP

Assign the player's group through your vRP admin tooling, then ensure the matching `group.<name>` principal is registered.

## Custom groups

To allow another group such as `supporter` to use one command, add it to the relevant entry:

```lua [sky_firejob/config/config.lua]
Config.CommandPermissions.skyfire = { "god", "superadmin", "admin", "supporter" }
```

Change this entry in the existing configuration; keep every other command entry. Replacing the whole table with a one-command example removes the other administrators' command grants.

Then grant the player the matching principal and restart `sky_firejob`.

## Activating boss permissions with `/setboss`

Once your admin group is set, run `/setboss` to grant every permission to a specific job grade:

```text
/setboss firefighter 4
```

Replace `firefighter` and `4` with your actual job name and highest numeric grade. Assign the test player that job and grade, go on duty, and check the station/tablet. This command grants job permissions; it does not create the framework job or change the player's job.

See the [Commands](../reference/commands) page for the full admin command list.

## Troubleshooting

<accordion>
<accordion-item label="Command says 'No permission'">

The player is not in any of the groups listed for that command in `Config.CommandPermissions`, or the [bootstrap ACEs](/docs/installation#permissions-bootstrap) are missing.

</accordion-item>

<accordion-item label="I granted the group but still no access">

After editing `server.cfg`, restart the server to apply the principals and permission grants. The player should reconnect after their group changes. Changes to a resource's `Config.CommandPermissions` also require that resource to restart.

</accordion-item>

<accordion-item label="I added a custom group">

Add the group string to the relevant command array, grant the matching principal, and restart the resource.

</accordion-item>

<accordion-item label="Unknown command: /setboss">

`sky_jobs_base` is not running. It must start before `sky_firejob` in `server.cfg`.

</accordion-item>
</accordion>

## Support

Need help? Our support team is always ready to assist.

<u-button color="neutral" icon="i-simple-icons-discord" label="Join Discord" target="_blank" to="https://discord.gg/sky-systems" variant="subtle">



</u-button>
