Jump to content

[TUTORIAL] Reset ownership / permissions on a Linux server


Recommended Posts

Here is a process to fix ownership/permissions of a Linux server (such as Ubuntu Server 20.04 LTS) that works for me.

Let's make the following assumptions (adjustments to your environment may need tuning):

  • Root folder where all Ark instances are installed = /opt/ark
  • Shared cluster folder = /opt/ark/cluster
  • Custom Bash scripts and utilities (rcon) = /opt/ark/scripts
  • User Group = arkgroup (ark users are members of this group)
  • Install/Update user account = arkinstall (has write access for all of Ark)
  • Runtime service user account = arkservice (has read-only access except for save data)

Here are the basic commands I would run each time whenever changes are made and I want to ensure ownership/permissions are correct.  I have them in an automation script that also loops through folders to dynamically handle many instances but wanted to keep it simple here.

# Set ownership on everything

chown --recursive arkinstall:arkgroup /opt/ark

# Reset default permissions on all folders

find /opt/ark -type d -exec chmod 0750 {} \;

# Reset default permissions on all folders

find /opt/ark -type f -exec chmod 0640 {} \;

# Fix binary execution and savegame write permissions

find /opt/ark/TheIsland/ShooterGame/Binaries -type f -exec chmod 0750 {} \;
find /opt/ark/TheIsland/ShooterGame/Saved -type d -exec chmod 0770 {} \;
find /opt/ark/TheIsland/ShooterGame/Saved -type f -exec chmod 0770 {} \;

# Fix cluster write permissions

chmod --recursive 0770 /opt/ark/cluster

# Refine specific file permissions

find /opt/ark/scripts -type f -exec chmod 0750 {} \;
chmod 0640 /opt/ark/scripts/*.c
chmod 0640 /opt/ark/scripts/*.py

LHammonds

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...