How to grant Oxide permissions in your Rust Server
The permission system in Oxide handles controlling who can use specific commands and features which most plugins offer. You can input any of these commands within your console if you are logged in on an admin account or from any RCON console. If you want to know how to set up an admin account, we have an article on how to add yourself as an admin in your Rust server here. Once you've finished making yourself an administrator you can follow on with this guide.
Most Oxide plugins will not work straight out-of-the-box and will require you to assign "permissions" in order for your players to make use of certain features and commands. Many of them are fairly expansive and will allow you to tailor it to your needs for the groups on your server.
The first big concept to understand is the grouping system. By default, Oxide comes with two pre-made groups:
admin- Includes all users who have administrator powers in your server
default- Includes all players who join your server, they are included in this group automatically
When you assign a permission to a group, all members of the group will have that permission. You will be able to make your own groups to create different tiers each with their own permissions, but more on that later.
Command Syntax for Entering Permissions
The best way to understand permissions, in my opinion, is to go through some example cases of how to use them. Fundamentally they all work the exact same way and are very easy to manage once you've mastered the command syntax. Let's use a common plugin, Vanish, as an example.
If a plugin has permissions available to use, they will always be displayed on the UMod page under the Permissions section. It will look like this:
You'll notice the command syntax in the box at the top, it is:
oxide.grant <user or group> <name or steam id> <permission>
The first argument,
<user or group>, quite literally asks you to specify whether you want to assign the permission to one specific user or one of your oxide groups. Lots of people tend to get tripped up on this and think that it's asking for the user or group name, but it is not, that is in the second argument after it.
The second argument,
<name or steam id>, asks for you to enter the name of the user or group that you want to give the permission to. If you are choosing to assign it to only one specific user, it is generally better to use the Steam 64 ID here as it is more accurate.
The final argument,
<permission>, is the name of the permission that you want to assign them. We found those on the UMod page just above, remember?
Each highlighted item is a
<permission> that you can use. With all of this information under our belt, let's look at some examples of how we can apply this.
Give all players access to go invisible:
oxide.grant group default vanish.allow
Make one specific user invisible forever:
oxide.grant user 76561147812372050 vanish.permanent
Give all administrators access to unlock locks while invisible:
oxide.grant group admin vanish.damage
Below, you will see a list of commands which can be entered into the console in the above format. You'll notice that you can revoke permissions from a user or group, and even create your own custom groups!
|oxide.grant user <name><permission>
|Grants a user a permission
|oxide.revoke user <name><permission>
|Revokes a users permission
|oxide.grant group <group><permission>
|Grants a group a permission
|oxide.revoke group <group><permission>
|Revokes a groups permission
|oxide.usergroup add <name><group>
|Adds a user to a group
|oxide.usergroup remove <name><group>
|Removes a user from a group
|oxide.group add <group> <"[Title]"><rank>
|Creates a new group Title and rank are optional depending on the circumstance.
|oxide.group remove <group>
|Removes a group
|oxide.group set <group><"[Title]"><rank>
|Sets the title or rank of a group.
|oxide.group parent <parentgroup><childgroup>
|Setting the parent group of another group
|oxide.show user <name>
|Shows a user's permissions
|oxide.show group <group>
|Shows a group's members and permissions
|oxide.show perm <permission>
|Shows which user or group has a permission
|Shows all groups or permissions
|oxide.grant group <group> *
|Grants a group a wildcard. Wildcard simply means all. So this would grant the right to all permissions
|oxide.grant user oxide.*
|Grants a user all permissions without adding them to the admin group.