LogoLogo
Deploy NowCommunity Careers
  • Introduction to StackAI
  • Litepaper
  • FAQs
    • Introductory FAQs
    • Technical FAQs
    • Project/App FAQ
    • Financial FAQs
  • Tokens
    • Add $STACK to MetaMask
    • Buy $STACK Tokens
  • App Deployment on StackOS
    • Custom App Deployment
    • AppStore App Deployment
    • Deploy a Containerized Application on StackOS
  • Basic Operations
    • Create WebTTY
    • WebTTY, Logs, Shell Access
    • Practice - Persistent Data, Alternate User
    • Reset StackOS Account
    • Map a container port
    • Custom DNS
    • Custom SSL
    • Account Funding - General
    • Pod Launch - General
  • Preparing Custom Images
    • Docker Hub Intro
    • GitHub, DockerHub and StackOS Integration
  • App Store Notes
    • Redis on StackOS
    • Memcached on StackOS
    • Presearch on StackOS
    • Wordpress on StackOS
    • Jenkins on StackOS
    • WebDAV on StackOS
  • Useful Apps
    • phpMyAdmin (Mysql Web Admin)
  • Wordpress Operations
    • Launching a Wordpress app on StackOS
    • WordPress Migration
    • Account Funding - Wordpress
    • Upload limit increase
    • SSL Mixed Content Resolution
    • Wordpress Domain Change
  • Other Applications
    • Python Applications
    • RSK
  • 0xMarket
    • Viewing your NodeNFT
    • Listing your NodeNFT
    • Buying a NodeNFT
Powered by GitBook
On this page
  • ✅ Create Application
  • ✅ Use WebTTY and enter your pod
  • ✅ After getting a shell into your pod
  • ✅ Check /data is owned by root
  • ✅ Create demo user
  • ✅ Give /data to demo user
  • ✅ Prove we can use a user that only exists in this pod
  • ✅ Run a command as another user
  • ✅ See a resulting file owned by the other user (which doesn't exist in the "hypervisor")
  1. Basic Operations

Practice - Persistent Data, Alternate User

PreviousWebTTY, Logs, Shell AccessNextReset StackOS Account

Last updated 3 years ago

App Name: switch

Image: nginx:1.21

Persistent Data Directory: /data

CPU: 500

RAM: 500

✅ Create Application

✅ Use WebTTY and enter your pod

✅ After getting a shell into your pod

---

✅ Check /data is owned by root

root# ls -al /data

total 24

drwxr-xr-x 3 root root 4096 Jan 19 12:54 .

drwxr-xr-x 1 root root 4096 Jan 19 12:57 ..

drwx------ 2 root root 16384 Jan 19 12:54 lost+found

✅ Create demo user

groupadd demo

useradd demo -g demo -m

✅ Give /data to demo user

chown demo:demo /data

✅ Prove we can use a user that only exists in this pod

su - demo -c whoami

demo

✅ Run a command as another user

root# su demo -c "touch /data/myfile"

✅ See a resulting file owned by the other user (which doesn't exist in the "hypervisor")

root# ls -al /data

total 24

drwxr-xr-x 3 demo demo 4096 Jan 19 13:01 .

drwxr-xr-x 1 root root 4096 Jan 19 12:57 ..

drwx------ 2 root root 16384 Jan 19 12:54 lost+found

-rw-r--r-- 1 demo demo 0 Jan 19 13:01 myfile

Create WebTTY