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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Permission issues using mounts for app data storage

    Support
    nextcloud cubby volumes
    3
    5
    139
    Loading More Posts
    • 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.
    • 3246
      3246 last edited by

      I've got the following setup and would like to use an external share mounted locally on the root file system of Cloudron for the data folder of an app:

      • VirtualBox host
      • Ubuntu 20.04 guest with Cloudron
      • Sharing folders from VBox to Cloudron and mounting via fstab
      • The share is mounted on /mnt/test and is owned by yellowtent

      I tried moving the data folder for both NextCloud and Cubby, which results in the data being successfully moved to the new home.

      However, in NextCloud's case it is unable to start the app as it fails to set a symlink:
      ln: failed to create symbolic link '/app/data/core': Operation not permitted

      In Cubby, the app runs but you cannot create or edit anything:
      POST /api/v1/files?path=%2Ftest&access_token=<redacted>&directory=true 500 Internal Server Error EACCES: permission denied, mkdir '/app/data/data/axel/test'

      Cubby looks ace by the way and I am looking to use it instead NextCloud 🙂

      3246 1 Reply Last reply Reply Quote 0
      • 3246
        3246 @3246 last edited by

        I've also tried to mount an external hard disk, rather than a network share (CIFS or VBox), which worked. Not sure what I am doing wrong 😢

        I used the Volumes GUI to mount the EXT4 HDD and then changed the NextCloud app data folder to /mnt/volumes/<IDofDisk> as shown in the Volumes list. No issues starting the app.

        This is great, however, I want to mount my local RAID instead of plumbing in an external disk.

        3246 1 Reply Last reply Reply Quote 0
        • 3246
          3246 @3246 last edited by 3246

          Tried a manually mounted CIFS share with Cubby and while I can create folders and files from the GUI, I cannot upload anything:

          [Error: EPERM: operation not permitted, copyfile '/tmp/YFfTJOFQlEjjf-s25ipOWhAM.png' -> '/app/data/data/axel/test/wordpress.png'] { errno: -1, code: 'EPERM', syscall: 'copyfile', path: '/tmp/YFfTJOFQlEjjf-s25ipOWhAM.png', dest: '/app/data/data/axel/test/wordpress.png' }

          The share was mounted using this:
          mount -t cifs -o username=<user>,password="<password>",rw,iocharset=utf8,file_mode=0666,dir_mode=0777,uid=yellowtent,gid=yellowtent //192.168.2.3/test /mnt/test

          Anything I upload directly via Samba shows in Cubby, I can create folders but not files using the Cubby interface and uploading anything results in an error.

          Me creating a text file using the GUI and failing:
          POST /api/v1/files?path=%2Ftest.txt&access_token=<redacted> 500 Internal Server Error EPERM: operation not permitted, copyfile '/tmp/XVKWw1b47ceh3aTgzcJPEIxe' -> '/app/data/data/axel/test.txt'

          Should I be filing this in the git repo as a defect instead of posting here 🤔

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            @3246 this is the correct place, the team is just not very active over the holidays at the moment 🙂 we will get to it.

            Maybe one pointer for you to further investigate if you want, the users and groups from the host system (yellowtent) are not usually mapped the same way in the app containers, so I suspect this causing some issue. Most apps have a chown command in the start.sh but this usually only refers to /app/data within the app, not the volumes...which might be the main issue, but I would have to take more time here.

            1 Reply Last reply Reply Quote 1
            • girish
              girish Staff last edited by

              Wondering where we are with this. @3246 do you need help on this?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB