Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39073

bodyPathDeleted silently defaults to {sakai.home}/null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.0
    • Fix Version/s: 10.1
    • Component/s: Kernel
    • Labels:
      None
    • 10 status:
      Resolved
    • Previous Issue Keys:
      KNL-1286
    • Test Plan:
      Hide

      If you have the bodyPath property set so files are written you your filesystem

      bodyPath@org.sakaiproject.content.api.ContentHostingService=<some path>

      For instance if your username is sakaiger on your system

      bodyPath@org.sakaiproject.content.api.ContentHostingService=/home/sakaiger/sakaibody

      The test for this is that no folders named 'null' appear in your home directory by default and that a message at startup which says

      Please set with the property: bodyPathDeleted@org.sakaiproject.content.api.ContentHostingService if you want to allow for deletion of resources.

      Then if you set this path it puts the files in this location such as
      bodyPathDeleted@org.sakaiproject.content.api.ContentHostingService=/home/sakaiger/sakaibodydeleted

      And then the warning no longer displays either.

      This cannot be tested on nightly.

      Show
      If you have the bodyPath property set so files are written you your filesystem bodyPath@org.sakaiproject.content.api.ContentHostingService=<some path> For instance if your username is sakaiger on your system bodyPath@org.sakaiproject.content.api.ContentHostingService=/home/sakaiger/sakaibody The test for this is that no folders named 'null' appear in your home directory by default and that a message at startup which says Please set with the property: bodyPathDeleted@org.sakaiproject.content.api.ContentHostingService if you want to allow for deletion of resources. Then if you set this path it puts the files in this location such as bodyPathDeleted@org.sakaiproject.content.api.ContentHostingService=/home/sakaiger/sakaibodydeleted And then the warning no longer displays either. This cannot be tested on nightly.

      Description

      If you don't explicitly define

      bodyPathDeleted@org.sakaiproject.content.api.ContentHostingService

      it appears to default to

      {sakai.home}

      /null. This is unhelpful in a cluster, as you get app-server specific locations like /usr/local/sakai/null/vol1/... and in practice it makes deleted files unrecoverable as the file contents are located on a specific app server and may be removed by updates, etc.

      The code should default this to something more sensible, e.g.

      {bodyPath}

      /deleted and also log the path used in catalina.out on startup.

      Currently bodyPath is logged but not bodyPathDeleted

      2014-08-05 13:35:26,535 INFO localhost-startStop-1 org.sakaiproject.content.impl.DbContentService - init(): tables: CONTENT_COLLECTION CONTENT_RESOURCE CONTENT_RESOURCE_BODY_BINARY CONTENT_ENTITY_GROUPS locks-in-db: false bodyPath: /data/sakai/content storage: org.sakaiproject.content.impl.DbContentService$DbStorage@791fe54c

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  smarquard Stephen Marquard
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code