Skip to content

Auto-unwanted file deletion after copy #2719

@nihl4

Description

@nihl4

Describe the bug

On desktop client, after downloading a file or moving one to an OpenCloud folder in "Personal", the file is automatically deleted a few second/minutes later.
This doesn't happen all the time but happen quite frequently, so I had trouble to reproduce it consistently.
If I then try to add the file again, it gives an "Error transferring [https://opencloud.example.com/dav/spaces/id] - server replied: " in activity when trying to sync it but doesn't get deleted (no explicit error message)
If I then try to upload the file through the web UI to the same location, I also have an "Unkown error".

An information that might be relevant too, I remember in the past having a similar bug, where I tried to upload with a different filename the same file in the UI, and then when trying to rename it to the correct previous filename, it said "filename already exist" event tho it was the only file in the folder (not a hidden file starting with dot).

I have this issue since January, I have been able to solve the issue for some time by doing a clean install, but it came back at some point.

Steps to reproduce

  1. Download or move a file to the OpenCloud desktop folder

Expected behavior

The file is copied to the OpenCloud folder and is not deleted

Actual behavior

The file is copied to the OpenCloud folder, then is deleted without actions on my end a few seconds/minutes later.

Setup

The server is started using docker compose. Here is the content of the file (note: I had the issue initially without OICD et SMTP setup)

services:
  opencloud:
    # renovate: depName=opencloudeu/opencloud-rolling
    image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-5.2.0}
    # changelog: https://github.com/opencloud-eu/opencloud/tree/main/changelog
    # release notes: https://docs.opencloud.eu/opencloud_release_notes.html
    container_name: opencloud
    user: xxxx:xxx
    entrypoint:
      - /bin/sh
    command:
      - -c
      - opencloud init || true; opencloud server
    environment:
      TZ: Europe/Paris
      # enable services that are not started automatically
      OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES}
      OC_URL: https://opencloud.example.com
      OC_LOG_LEVEL: ${LOG_LEVEL:-info}
      OC_LOG_COLOR: ${LOG_PRETTY:-false}
      OC_LOG_PRETTY: ${LOG_PRETTY:-false}
      # do not use SSL between the reverse proxy and OpenCloud
      PROXY_TLS: "false"
      # INSECURE: needed if OpenCloud / reverse proxy is using self generated certificates
      OC_INSECURE: true
      # basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
      PROXY_ENABLE_BASIC_AUTH: true
      #PROXY_ENABLE_BASIC_AUTH: ${PROXY_ENABLE_BASIC_AUTH:-false}
      # demo users
      IDM_CREATE_DEMO_USERS: ${DEMO_USERS:-false}
      # admin password
      #IDM_ADMIN_PASSWORD: ${INITIAL_ADMIN_PASSWORD}
      # email server (if configured)
      NOTIFICATIONS_SMTP_HOST: ${SMTP_HOST}
      NOTIFICATIONS_SMTP_PORT: ${SMTP_PORT}
      NOTIFICATIONS_SMTP_SENDER: ${SMTP_SENDER:-OpenCloud Notifications
        <notifications@cloud.opencloud.test>}
      NOTIFICATIONS_SMTP_USERNAME: ${SMTP_USERNAME}
      NOTIFICATIONS_SMTP_PASSWORD: ${SMTP_PASSWORD}
      NOTIFICATIONS_SMTP_INSECURE: ${SMTP_INSECURE:-false}
      NOTIFICATIONS_SMTP_AUTHENTICATION: ${SMTP_AUTHENTICATION}
      NOTIFICATIONS_SMTP_ENCRYPTION: ${SMTP_TRANSPORT_ENCRYPTION:-none}
      FRONTEND_ARCHIVER_MAX_SIZE: "10000000000"
      FRONTEND_CHECK_FOR_UPDATES: ${CHECK_FOR_UPDATES:-true}
      # enable to allow using the banned passwords list
      #OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST: banned-password-list.txt
      # control the password enforcement and policy for public shares
      OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD: ${OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:-true}
      OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD: ${OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD:-false}
      OC_PASSWORD_POLICY_DISABLED: ${OC_PASSWORD_POLICY_DISABLED:-false}
      OC_PASSWORD_POLICY_MIN_CHARACTERS: ${OC_PASSWORD_POLICY_MIN_CHARACTERS:-8}
      OC_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS: ${OC_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:-1}
      OC_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS: ${OC_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:-1}
      OC_PASSWORD_POLICY_MIN_DIGITS: ${OC_PASSWORD_POLICY_MIN_DIGITS:-1}
      OC_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS: ${OC_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:-1}
      # default language for services/WebUI; defaults to English, language code (ISO 639-1, e.g. de, en, fr)
      OC_DEFAULT_LANGUAGE: ${DEFAULT_LANGUAGE}
      IDP_DOMAIN: ${IDP_DOMAIN}
      OC_OIDC_ISSUER: ${OC_OIDC_ISSUER}
      WEB_OIDC_CLIENT_ID: ${WEB_OIDC_CLIENT_ID}
      OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET}
      WEB_OIDC_SCOPE: openid profile email groups offline_access # Offline access prevents logouts as soon as the access token expires.
      OIDC_REDIRECT_URI: https://${OC_DOMAIN:-cloud.opencloud.test}
      OC_EXCLUDE_RUN_SERVICES: idp
      PROXY_OIDC_REWRITE_WELLKNOWN: "true"
      PROXY_AUTOPROVISION_ACCOUNTS: "true"
      PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD: none
      PROXY_OIDC_SKIP_VERIFICATION: "false"
      PROXY_USER_OIDC_CLAIM: preferred_username
      PROXY_AUTOPROVISION_CLAIM_USERNAME: preferred_username
      PROXY_ROLE_ASSIGNMENT_DRIVER: oidc
      PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM: groups
      GRAPH_ASSIGN_DEFAULT_USER_ROLE: "false"
      GRAPH_USERNAME_MATCH: none
      PROXY_CSP_CONFIG_FILE_LOCATION: /etc/opencloud/csp.yaml
      WEBFINGER_OIDC_ISSUER_DESKTOP: ${WEBFINGER_OIDC_ISSUER_DESKTOP}

    volumes:
      - ./config:/etc/opencloud
      - /path/to/OpenCloud/data:/var/lib/opencloud
      - ./config/proxy.yaml:/etc/opencloud/proxy.yaml
      - ./config/csp.yaml:/etc/opencloud/csp.yaml
      - ./apps:/var/lib/opencloud/web/assets/apps
    ports:
      - 9201:9200
    logging:
      driver: local
    restart: unless-stopped
Details

PROXY_ENABLE_BASIC_AUTH=true
OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD=true
INSECURE=true

OC_DOCKER_IMAGE=opencloudeu/opencloud-rolling
OC_DOCKER_TAG=latest

DEMO_USERS=false

Additional context

The server is served through reverse proxy, initially it was by Synology integrated one and now by Caddy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Prio 2

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions