Skip to content

Permissions edge-case during updates #3060

@grandprixgp

Description

@grandprixgp

User Story

If you don't have permissions over the $rootdir folder itself, but only the relevant contents of $rootdir, updates will fail because sed attempts to drop temporary files into this folder. In addition to this, when an update fails at this section, the backup previously made is not restored to $rootdir which causes the gameserver.sh to report an invalid gameserver:

[ FAIL ] unknown game server

Basic info

  • Distro: All
  • Game: N/A
  • Command: update
  • LinuxGSM version: <= v20.5.0

Further Information

The bug occurs because we don't utilize $tmpdir to sed our changes, additionally we do not restore the backup previously created here.

To Reproduce

Steps to reproduce the behaviour:

  1. Set permissions such that you have the required permissions for all LGSM files and folders but not the root directory itself.
  2. Launch an update
  3. gameserver.sh becomes invalid and update fails.

Expected behaviour

At the very least the backup should be restored in this case, but it is trivial to remove the case entirely by utilizing the $tmpdir rather than the $rootdir for sed changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    Projects

    Status

    🆕 New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions