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
  • Brite
  • 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

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Euro Office
  3. Euro Office 1.1.4 (DocumentServer 9.3.8): saving to Nextcloud fails, output files are created 0640 and nginx returns 403

Euro Office 1.1.4 (DocumentServer 9.3.8): saving to Nextcloud fails, output files are created 0640 and nginx returns 403

Scheduled Pinned Locked Moved Euro Office
5 Posts 5 Posters 84 Views 5 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.
  • imc67I
    imc67I
    imc67
    translator Super Fan
    wrote last edited by
    #1

    After the automatic update to 1.1.4 (DocumentServer 9.3.8) last night, saving documents back to Nextcloud no longer works. The app stays healthy and /healthcheck returns true, so nothing in the dashboard shows it. I rolled back to 1.1.3 from the pre-update backup and everything works again.

    Symptom

    The connector check in Nextcloud fails:

    occ eurooffice:documentserver --check
    Error connection: Client error: `GET http://<app-id>/cache/files/data/conv_check_435581786_65/output.docx/check_435581786.docx?md5=…&expires=…&filename=check_435581786.docx` resulted in a `403 Forbidden` response
    

    The same /cache/files/... route is what Nextcloud uses to fetch the edited document on every save, so real saves fail the same way.

    Cause

    Since 9.3.8 the document server writes its output files with mode 0640 instead of 0644. nginx runs as www-data and can no longer read them:

    [error] open() "/var/lib/euro-office/documentserver/App_Data/cache/files/data/conv_check_549698124_65/output.docx" failed (13: Permission denied)
    
    # before the update (1.1.3)
    -rw-r--r-- 1 ds ds 8221 Nov 14 08:05 output.docx
    # after the update (1.1.4)
    -rw-r----- 1 ds ds 8154 Nov 15 08:22 output.docx
    

    The directories are still drwxr-xr-x ds:ds; only the files changed. In the access log the switch is exact: last 200 on /cache/files at 00:50 UTC, the update at 01:01, first 403 at 01:10, and only 403s after that.

    What I ruled out

    • Not the secure_link secret: both nginx and the document server use the default verysecretstring, and I recomputed the signature of a rejected URL (base64url(md5(expires + uri + secret))); it matches.
    • Not the umask: the docservice and converter processes run with umask 0022, so the 0640 seems to be set explicitly in the new code (my guess is the output writer in core/x2t; 9.3.8 changed ZIP writing in core#289, but I did not find the exact line).

    Workaround

    Restore the app from the backup Cloudron made just before the update (it rolls the package back to 1.1.3) and turn off automatic updates for the app until this is fixed. After the restore new files are 0644 again and the connector check passes. Adding www-data to the ds group inside the container would also work, but that is lost on every restart.

    Suggestion

    It would help if the package's health check (or a test in the package) did what the connector's --check does: convert a document and fetch the result through nginx. That would have caught this before release, because /healthcheck stays green.

    Cloudron 10.1.6, Nextcloud 35.0.2 with the eurooffice connector 11.0.6, Euro Office 1.1.3 → 1.1.4.

    1 Reply Last reply
    5
    • firmansiF
      firmansiF
      firmansi
      wrote last edited by
      #2

      Is there any workaround on this issue?

      A 1 Reply Last reply
      0
      • firmansiF firmansi

        Is there any workaround on this issue?

        A
        A
        as1111111
        wrote last edited by
        #3

        @firmansi Reverting back to version 1.1.3 as indicated in the original post solved the problem for the time being for me.

        1 Reply Last reply
        1
        • P
          P
          pbischoff
          wrote last edited by
          #4

          Hello,

          we hit the same failure on one of our instances (package 1.1.4 / DocumentServer 9.3.8.37, Nextcloud 35.0.3, connector 11.0.6) and your analysis matched what we saw. We also recomputed the secure_link signature of a rejected URL and it was valid.

          Two additions that may be useful:

          • Adding www-data to the ds group was not possible for us: the container root file system is read-only (usermod → "cannot lock /etc/passwd"). Only /tmp, /run and /app/data are writable.
          • What helped us instead was an ACL entry u:www-data:r-x, as default ACL on /tmp and on .../App_Data/cache/files/data, plus once recursively for the files already there. New files created in /tmp pick the entry up automatically, and since it is stored with the file itself it also survived the rename into the cache for us. Owner and mode of the files stay unchanged. (setfacl was not installed in our image, so we set the ACL attribute directly.)

          After that /cache/files/... returned 200 instead of 403 for us, occ eurooffice:documentserver --check reports "successfully connected", and opening and editing docx and xlsx works again. Because /tmp and /app/data are persistent volumes, we expect it to survive restarts as well. We have not been through an app update with it yet, so we kept it as a stopgap and kept the connector's cron check as our alarm, which mails the admins as soon as the check fails again. Whoever prefers to stay on an unchanged package can also restore the pre-update backup instead, but then auto updates for the app should stay off.

          1 Reply Last reply
          0
          • jamesJ
            jamesJ
            james
            Staff
            wrote last edited by
            #5

            Hello @euro-office users
            I am already looking into it.

            1 Reply Last reply
            1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            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