DSpace 7.6 FIle Upload Failure

68 views
Skip to first unread message

ANOOP PA

unread,
Jan 23, 2025, 7:38:29 AM1/23/25
to DSpace Technical Support

Dear Team,

I am encountering a persistent "Upload failed" error, as illustrated in the attached image. While uploads were previously functioning correctly, this issue has been occurring for the past few days.

My DSpace instance is version 7.6 and is publicly accessible via an Apache2 proxy.

Thank you for your assistance.Upload Failed.png

ANOOP PA

unread,
Jan 23, 2025, 7:57:38 AM1/23/25
to DSpace Technical Support
Thankyou Everyone i got the solution for this issue

Why it happens:

  • Systemd Sandboxing: Debian's tomcat9 package uses systemd to manage the Tomcat service. Systemd employs sandboxing techniques to enhance security by restricting the resources and access that a service has. This includes limiting file system access.
  • Default Restrictions: By default, Tomcat is only granted write access to specific directories like conf, log, work, and webapps. This is a security measure to prevent Tomcat from potentially writing to sensitive areas of the file system.
  • Configuration Overrides: When you directly modify Tomcat's main service file, your changes can be overwritten during package updates or service restarts. This is because the package maintainers provide the default configuration, and your direct edits are seen as deviations.

How to fix it:

The correct way to add or modify ReadWritePaths is to create an override file for the Tomcat service. This ensures that your changes are preserved across updates.

Here's how:

  1. Create the override directory:


    sudo mkdir -p /etc/systemd/system/tomcat9.service.d/
  2. Create the override file:

    Create a file named override.conf inside the directory you just created:


    sudo nano /etc/systemd/system/tomcat9.service.d/override.conf
  3. Add your ReadWritePaths:

    Inside override.conf, add the following, making sure to replace /dspace/ with the actual path you need:

    [Service]
    ReadWritePaths=/dspace/

    If you need to grant access to multiple paths, list them separated by spaces:

    [Service]
    ReadWritePaths=/dspace/ /another/path/ /yet/another/path/
  4. Reload systemd and restart Tomcat:

    Apply the changes and restart Tomcat:


    sudo systemctl daemon-reload
    sudo systemctl restart tomcat9
Reply all
Reply to author
Forward
0 new messages