Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Shell environment customization (for root)

Shell environment customization (for root)

Scheduled Pinned Locked Moved Feature Requests
bashweb terminalcustomization
4 Posts 2 Posters 55 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    charlesnw
    wrote last edited by
    #1

    Per @james , I am putting in a feature request instead of a support topic.

    Context:

    I am running about 20 of the Cloudron LAMP app instances.

    I have been updating them via WINSCP/FileZilla. I'm switching to doing a git pull (since all of the content is managed in a git repo).

    Currently I have to:

    su www-data -c "git pull"
    

    Otherwise I get:

    root@16405153-e269-41e3-ab8d-095606d5b07e:/app/data/public/KNEL/FetchApply# git pull
    fatal: detected dubious ownership in repository at '/app/data/public/KNEL/FetchApply'
    To add an exception for this directory, call:
    
        git config --global --add safe.directory /app/data/public/KNEL/FetchApply
    root@16405153-e269-41e3-ab8d-095606d5b07e:/app/data/public/KNEL/FetchApply# git config --global --add safe.directory /app/data/public/KNEL/FetchApply
    error: could not lock config file /root/.gitconfig: Read-only file system
    

    I want to make an alias for the su -... command.

    Editing .bashrc says read only filesystem.

    Question 1: Should we have the ability to customize the root shell on cloudron? Does this compromise the integrity of the system? What are the downsides? What are the rollback / recovery mechanisms?

    Question 2: Should we have the ability to change shells? (I am a huge zsh user, cloudron is the only system in my fleet not using zsh).

    Question 3: How should different kinds of customizations be handled? For example, aliases/ps(x)/themes etc? Should it only be a single custom file where you can put "whatever you want"? Should it be a set of files?

    Question 4: Can the files be able to be pulled from version control?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joseph
      Staff
      wrote last edited by
      #2

      You can already put stuff in /app/data/.bashrc . This is automatically sourced by /root/.bashrc if it exists

      1 Reply Last reply
      2
      • C Offline
        C Offline
        charlesnw
        wrote last edited by
        #3

        Thanks!!! That's awesome. That did EXACTLY what I needed. 🙂

        1 Reply Last reply
        1
        • C Offline
          C Offline
          charlesnw
          wrote last edited by
          #4
          Connecting...
          root@16405153-e269-41e3-ab8d-095606d5b07e:/app/data/public/KNEL/FetchApply# gup
          Already up to date.
          root@16405153-e269-41e3-ab8d-095606d5b07e:/app/data/public/KNEL/FetchApply# cat /app/data/.bashrc 
          cd /app/data/public/KNEL/FetchApply
          alias gup='su www-data -c "git pull"'
          
          root@16405153-e269-41e3-ab8d-095606d5b07e:/app/data/public/KNEL/FetchApply# 
          
          

          Ah this opens up all manner of creature comforts. Excellent! Really appreciate the prompt response @joseph

          1 Reply Last reply
          2
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search