question

Marcel Ernst avatar image
Marcel Ernst asked

Docker container write permissions with Unreal Engine

Hi,

I'm trying to run a Linux dedicated server, using the GSDK and Unreal Engine. The Unreal Engine refuses to run as root, thus another user has to be used in the Docker container. The Config, GameCertificates, GameLogs and GameSharedContent are mounted with 755 permissions and root as owner, which results in permission denied errors, when trying to write logs or shared content files. Is there any way to fix this issue?

sdksmultiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

Please refer to the Setting up a Linux Dedicated Server on PlayFab section in PlayFab GSDK Unreal plugin.

Basically, in your Docker file, you will need to create a user to run as:

 # Unreal refuses to run as root user, so we must create a user to run as
 # Docker uses root by default
 RUN useradd --system ue
 USER ue

And then copy your server files with correct permissions:

 COPY --chown=ue:ue . /server

Also, you will need a startup.sh script to add permission for game logs and actually run your server with the new user created:

 chown -R ue.ue $PF_SERVER_LOG_DIRECTORY
 su ue -c ./<projectname>Server.sh
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Marcel Ernst avatar image Marcel Ernst commented ·

Oh yeah with an extra startup script it should work. I previously used this linked Dockerfile from the docs.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.