Root permissions are not available on Upsun.
There are very little reasons that root is needed and it is an active security risk.
Upsun is a managed Platform As A Service. After the build step, the file system is read only, further enhancing security. Only the mount points you define will be able to accept writing files to it.
The idea is that code should not be changing at runtime. After you build your site, it should continue to function exactly as you intend to. Having a read only file system eliminates many of the security issues frameworks experience on the regular.
The next question will then be how to install certain packages, and the answer is fairly big.
First: at runtime, you don't. You have to use build step to change and install things. Using package managers like composer, npm, etc... is the easy part. But for more advanced things, you can run arbitrary linux bash commands in the build hook. https://docs.upsun.com/create-apps/hooks/hooks-comparison.html#build-hook
If the regular images are too restrictive, you can also use the composable image, which allows you to use nix packages to install just about anything in your container. https://docs.upsun.com/create-apps/app-reference/composable-image.html
Comments
Please sign in to leave a comment.