Batch ingest not removing files from /files directory

101 views
Skip to first unread message

Phil R

unread,
Sep 19, 2014, 11:25:37 AM9/19/14
to isla...@googlegroups.com
We've been having this issue recently so I thought I'd throw it up here to see if anyone has experienced it.

Islandora 7

How it's supposed to work:

When using Batch Ingest on a zip file with no metadata xml:
- zip file and two .xml files (MODS and DC) are written to the /files dir of Drupal
- A Batch Ingest Queue entry is created in example.com/admin/reports/islandora_batch_queue.  
- An entry is created the MySQL table file_managed with a status=1.  
- After deletion of the Queue entry, the file_managed reflects status=0.  Drupal will delete any file which is older than six hours in the next cron job that is in the file_managed table with a status of 0, so it should keep your /files folder clear.

How it's working for me:

Deleting the entry in the Batch Ingest Queue does not set the .xml status to 0.  This means that the .xml files are filling the /files folder up.

Phil R

unread,
Sep 19, 2014, 11:28:27 AM9/19/14
to isla...@googlegroups.com

Ernie Gillis

unread,
Sep 19, 2014, 11:44:14 AM9/19/14
to isla...@googlegroups.com
I, too, was looking into this, and found this thread: https://groups.google.com/d/msg/islandora/AJ2kXxq0lAM/bWqgcpnAfSIJ

I am trying to figure out why my TIFF files are not being removed from [drupal-install]/sites/defaults/files . It could be for the same reason.

Ernie Gillis

unread,
Sep 19, 2014, 11:44:51 AM9/19/14
to isla...@googlegroups.com
"default/files" that is :|

Phil Redmon

unread,
Sep 19, 2014, 12:12:54 PM9/19/14
to isla...@googlegroups.com
I have a working theory on this. I'm seeing the following actions
from batch_ingest

- .zip file is written to .tmp (if the .zip file is the same name, the
file is incremented by _0, _1, ...)
- .zip is unzipped into /files folder
- .tif file has 644 permissions
- the file_managed entry appropriately has status=0
- the .tif file in /files doesn't get deleted after six hours/cron

I think the .tif file's permissions may have something to do with it
not being deleted. The .xml files have 664 permissions and are
deleted correctly when the file_managed entry is manually set to
status=0. The .tif file's permissions should probably be set to 664.
> --
> For more information about using this group, please read our Listserv
> Guidelines: http://islandora.ca/content/welcome-islandora-listserv
> ---
> You received this message because you are subscribed to the Google Groups
> "islandora" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to islandora+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/islandora.
> For more options, visit https://groups.google.com/d/optout.



--
phil

Phil R

unread,
Sep 19, 2014, 12:19:11 PM9/19/14
to isla...@googlegroups.com
I guess this would really be two issues:

- .tif files in the /files directory aren't being deleted because of permissions
- .xml files in the /files directory aren't being deleted because of file_managed entry with status=1

Ernie Gillis

unread,
Sep 19, 2014, 12:33:07 PM9/19/14
to isla...@googlegroups.com
Great info!
But oh so lovely to deal with *smh*

Ernie Gillis

unread,
Sep 19, 2014, 12:35:05 PM9/19/14
to isla...@googlegroups.com
According to my "/files" directory structure, though, my ".tif" files all have 664 permissions. I will need to dig deeper...

Brad Spry

unread,
Oct 7, 2014, 12:49:45 AM10/7/14
to isla...@googlegroups.com
This sounds similar to the issue I'm experiencing:

Phil R

unread,
Oct 15, 2014, 5:54:47 PM10/15/14
to isla...@googlegroups.com
Thanks for making this ticket.  It was brought up at Islandora Camp, so we may have more eyes on this issue soon.  Lets get some action on that JIRA ticket!
Reply all
Reply to author
Forward
0 new messages