This page contains various procedures and tips to help you work with your Opalstack service.

HOWTO grant access to a directory

If you want to share a directory with another shell user you can do so by setting the access control lists while logged in as your shell user.

ℹ️ Note

Opalstack recommends that you use a separate shell user for each project or website that you are running. Doing so has a couple of benefits:

  • Since each site is running as a different user, your sites isolated from each other. This means that problems on one site are less likely to have an impact on your other sites.
  • If you're working with a client, you won't have to manage complicated permissions to keep your client's shell user from seeing your other client directory names. Your client will have access only to their files, and you can use your own shell user to access them by using the procedure that follows.

This example shows how shell user userA can share an application directory myapp with another shell user userB:

  1. Log in to SSH as userA.

  2. Execute the following commands as userA:

    setfacl -m u:userB:--x $HOME
    setfacl -R -m u:userB:rwx $HOME/apps/myapp
    setfacl -R -m d:u:userB:rwx $HOME/apps/myapp
    setfacl -R -m d:u:userA:rwx $HOME/apps/myapp
    chmod g+s $HOME/apps/myapp
  3. Optional: to create a shortcut to the directory for userB, run the following command as userB:

    ln -s /home/userA/apps/myapp ~/myapp

HOWTO use a newer version of gcc

As of December 2020 Opalstack's servers are running CentOS 7 which includes older versions of gcc and other development tools which may not work for compiling newer software.

If you need to compile software that requires a newer compiler you can enable gcc version 9 via the devtoolset-9 software collection.

To do so, run the following command as your shell user:

scl enable devtoolset-9 bash

This will run a new bash session with the newer compiler enabled, eg:

[user@opal1 ~]$ scl enable devtoolset-9 bash
[user@opal1 ~]$ gcc --version
gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO