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. Directus
  3. Move file in directus app: read-only file system

Move file in directus app: read-only file system

Scheduled Pinned Locked Moved Solved Directus
13 Posts 3 Posters 2.5k Views 3 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.
  • D Offline
    D Offline
    devtron
    wrote on last edited by
    #1

    Unfortunately, I can't move a file (snapshot.yaml) from /tmp to my desired destination in the directus app:

    mv: inter-device move failed: 'tmp/snapshot.yaml' to 'app/snapshot.yaml'; unable to remove target: Read-only file system
    

    Can I disable read-only to move the file temporarly?

    1 Reply Last reply
    0
    • D devtron

      @nebulon I put the app in recovery/debug mode. It became writable but got another issue:

      "DB_CLIENT" Environment Variable is missing.
      

      fb424e83-ce86-4db7-8949-b1a2536202e9-image.png

      I've tried to add the changes in the env file in app/data. It didn't work. After that I tried to start it normally and got a new error with redis:

      ec91e9ce-c7d0-4d33-8295-10a18b9d28af-image.png

      😅

      nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #12

      @devtron the DB_CLIENT is set and configured in the /app/pkg/start.sh which also sets up other required settings. So while having the app in debug mode, you either have to run relevant pre-setup commands required for npx directus schema apply or put that line at the correct place in /app/pkg/start.sh and run that whole script.

      For redis, you can check the services view in your dashboard and manually start it from there first.

      D 1 Reply Last reply
      1
      • D Offline
        D Offline
        devtron
        wrote on last edited by
        #2

        This worked:

        mv -b tmp/snapshot.yaml /app/...
        

        But curious to know if I am able to disable it.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          devtron
          wrote on last edited by devtron
          #3

          I can't apply my scheme to directus:

          root@...:/app/data# npx directus schema apply snapshot.yaml 
          npm ERR! code EROFS
          npm ERR! syscall open
          npm ERR! path /root/.npm/_cacache/tmp/e889ceb7
          npm ERR! errno EROFS
          npm ERR! rofs Invalid response body while trying to fetch https://registry.npmjs.org/directus: EROFS: read-only file system, open '/root/.npm/_cacache/tmp/e889ceb7'
          npm ERR! rofs Often virtualized file systems, or other file systems
          npm ERR! rofs that don't support symlinks, give this error.
          
          1 Reply Last reply
          0
          • D Offline
            D Offline
            devtron
            wrote on last edited by
            #4

            Still have this issue...

            nebulonN 1 Reply Last reply
            0
            • girishG girish moved this topic from Support on
            • D devtron

              Still have this issue...

              nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #5

              @devtron on Cloudron all apps run in a read-only filesystem, causing this issue. However for things which need to be writeable, we link them into to the read/write section.
              What is the use-case, requiring you to move the snapshot.yaml ?

              D 1 Reply Last reply
              0
              • nebulonN nebulon

                @devtron on Cloudron all apps run in a read-only filesystem, causing this issue. However for things which need to be writeable, we link them into to the read/write section.
                What is the use-case, requiring you to move the snapshot.yaml ?

                D Offline
                D Offline
                devtron
                wrote on last edited by
                #6

                @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                MooCloud_MattM nebulonN 2 Replies Last reply
                0
                • D devtron

                  @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                  In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                  MooCloud_MattM Offline
                  MooCloud_MattM Offline
                  MooCloud_Matt
                  wrote on last edited by
                  #7

                  @devtron
                  I think that was a feature in version 8 or lower but is really interesting if it's still supported, can post the link to the documentation.

                  Matteo. R.
                  Founder and Tech-Support Manager.
                  MooCloud MSP
                  Swiss Managed Service Provider

                  D 1 Reply Last reply
                  0
                  • MooCloud_MattM MooCloud_Matt

                    @devtron
                    I think that was a feature in version 8 or lower but is really interesting if it's still supported, can post the link to the documentation.

                    D Offline
                    D Offline
                    devtron
                    wrote on last edited by
                    #8

                    @moocloud_matt
                    Here is the link for their newest version 9
                    https://docs.directus.io/reference/cli/#snapshot-the-data-model

                    I am also using Directus 9 and used it during their rc-phase

                    MooCloud_MattM 1 Reply Last reply
                    1
                    • D devtron

                      @moocloud_matt
                      Here is the link for their newest version 9
                      https://docs.directus.io/reference/cli/#snapshot-the-data-model

                      I am also using Directus 9 and used it during their rc-phase

                      MooCloud_MattM Offline
                      MooCloud_MattM Offline
                      MooCloud_Matt
                      wrote on last edited by
                      #9

                      @devtron
                      Nice, the old version has a dedicated page on it, and I didn't find it on the new documentation.

                      Matteo. R.
                      Founder and Tech-Support Manager.
                      MooCloud MSP
                      Swiss Managed Service Provider

                      1 Reply Last reply
                      0
                      • D devtron

                        @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                        In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                        nebulonN Offline
                        nebulonN Offline
                        nebulon
                        Staff
                        wrote on last edited by
                        #10

                        @devtron said in Move file in directus app: read-only file system:

                        @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                        In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                        ah I see, if this is a one-time task, you could also put the app in debug mode, which makes the filesystems temporarily read/write (but not persistent across restarts)

                        D 1 Reply Last reply
                        1
                        • nebulonN nebulon

                          @devtron said in Move file in directus app: read-only file system:

                          @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                          In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                          ah I see, if this is a one-time task, you could also put the app in debug mode, which makes the filesystems temporarily read/write (but not persistent across restarts)

                          D Offline
                          D Offline
                          devtron
                          wrote on last edited by
                          #11

                          @nebulon I put the app in recovery/debug mode. It became writable but got another issue:

                          "DB_CLIENT" Environment Variable is missing.
                          

                          fb424e83-ce86-4db7-8949-b1a2536202e9-image.png

                          I've tried to add the changes in the env file in app/data. It didn't work. After that I tried to start it normally and got a new error with redis:

                          ec91e9ce-c7d0-4d33-8295-10a18b9d28af-image.png

                          😅

                          nebulonN 1 Reply Last reply
                          0
                          • D devtron

                            @nebulon I put the app in recovery/debug mode. It became writable but got another issue:

                            "DB_CLIENT" Environment Variable is missing.
                            

                            fb424e83-ce86-4db7-8949-b1a2536202e9-image.png

                            I've tried to add the changes in the env file in app/data. It didn't work. After that I tried to start it normally and got a new error with redis:

                            ec91e9ce-c7d0-4d33-8295-10a18b9d28af-image.png

                            😅

                            nebulonN Offline
                            nebulonN Offline
                            nebulon
                            Staff
                            wrote on last edited by
                            #12

                            @devtron the DB_CLIENT is set and configured in the /app/pkg/start.sh which also sets up other required settings. So while having the app in debug mode, you either have to run relevant pre-setup commands required for npx directus schema apply or put that line at the correct place in /app/pkg/start.sh and run that whole script.

                            For redis, you can check the services view in your dashboard and manually start it from there first.

                            D 1 Reply Last reply
                            1
                            • nebulonN nebulon

                              @devtron the DB_CLIENT is set and configured in the /app/pkg/start.sh which also sets up other required settings. So while having the app in debug mode, you either have to run relevant pre-setup commands required for npx directus schema apply or put that line at the correct place in /app/pkg/start.sh and run that whole script.

                              For redis, you can check the services view in your dashboard and manually start it from there first.

                              D Offline
                              D Offline
                              devtron
                              wrote on last edited by
                              #13

                              @nebulon Alright, got it. Thank you!

                              1 Reply Last reply
                              0
                              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