Closed bondjimbond closed 5 years ago
The function that gets the datastreams is https://github.com/mjordan/islandora_bagit/blob/7.x/islandora_bagit.module#L1029, which uses the normal Tuque API and does not directly point to localhost for fedora. Sorry, I don't know what could be causing it. Stupid question, but are you sure you have enabled some plugins?
Some Islandora Bagit plugins that is.
Yep, I've enabled each plugin. The Bagit configuration in my production environment is the same as in my Vagrant machine (which works just fine).
Turns out it's a permissions issue on /tmp/islandora_bagit_temp - but it's a hard one to correct.
IF ownership on /tmp/islandora_bagit_temp is "apache apache":
IF ownership on /tmp/islandora_bagit_temp is "myuser mygroup":
Is there a way to set up ownership on this directory that allows bags to be created both ways??
You could create a group that has write permissions on the Bagit temp dir, then add both apache user and the user running drush to that new group.
Hm, I gave that a try -- but it doesn't work:
sudo chown :bagitusers /tmp/islandora_bagit_tmp
Result: only the owner user can get bags working. If owner is apache, it works via UI. If owner is me, it works in drush.
It seems that only the owner (not the group) has full permission to the directory... is that weird?
Did you also chmod -R g+w
?
I did chmod 775 -- does that do the same thing, or are the permissions different?
What do your error logs say now?
-R
is recursive, you probably should include it.
Same as ever. With apache as owner and bagitusers as group, UI bags are fine. Drush fails. This is my drush output:
$ cd /var/www/drupal7/sites/irbu.arcabc.ca && drush -u 1 westvault-bagit mkdir(): Permission denied islandora_bagit.module:341 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/DC.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] mkdir(): Permission denied plugin_object_archivematica_transfers.inc:33 [warning] mkdir(): Permission denied plugin_object_archivematica_transfers.inc:34 [warning] rename(/tmp/islandora_bagit_tmp/0d26ebd/DC.xml,/tmp/islandora_bagit_tmp/0d26ebd/metadata/dublincore.xml): No such file or directory [warning] plugin_object_archivematica_transfers.inc:37 copy(/tmp/islandora_bagit_tmp/0d26ebd/metadata/dublincore.xml): failed to open stream: No such file or directory bagit.php:438 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/RELS-EXT.rdf): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/MODS.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/DC.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PDF.pdf): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/TN.jpg): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PREVIEW.jpg): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/FULL_TEXT.txt): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/POLICY.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PRESERVATION.xml): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] file_put_contents(/tmp/islandora_bagit_tmp/0d26ebd/foo.xml): failed to open stream: No such file or directory plugin_object_ds_add_file.inc:36[warning] copy(/tmp/islandora_bagit_tmp/0d26ebd/foo.xml): failed to open stream: No such file or directory bagit.php:438 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/RELS-EXT.rdf): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/MODS.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/DC.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PDF.pdf): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/TN.jpg): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PREVIEW.jpg): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/FULL_TEXT.txt): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/POLICY.bin): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] fopen(/tmp/islandora_bagit_tmp/0d26ebd/PRESERVATION.xml): failed to open stream: No such file or directory HttpConnection.php:752 [warning] curl_setopt(): supplied argument is not a valid File-Handle resource HttpConnection.php:764 [warning] file_put_contents(/tmp/islandora_bagit_tmp/0d26ebd/foxml.xml): failed to open stream: No such file or directory plugin_object_foxml.inc:51 [warning] copy(/tmp/islandora_bagit_tmp/0d26ebd/foxml.xml): failed to open stream: No such file or directory bagit.php:438 [warning] Bag created and saved at sites/irbu.arcabc.ca/files/Bag-irbu_35.tgz [status] Files added: metadata/dublincore.xml, foo.xml, foxml.xml
As a test (not in production), make the Bagit temp directory world writable and see if that works. then you know for sure it's a permissions problem an you can progressively dial back the permissions until you get something that works but is not so permissive.
OK, more weirdness... After going back and forth between apache:apache and brandonw:admins trying to figure out the problem, it suddenly started working on both sides without any additional configuration.
This whole process has been pretty strange, but hey, it's working.
All that's left, I think, is either #29 or updating Islandora Bagit for paged and compound objects.
I'm testing Islandora Westvault in my Arca multisite production environment... And while my drush commands and everything work beautifully, Islandora Bagit doesn't! The files it produces are empty aside from the info text files added by the plugins.
I've posted about this problem in the Google group: https://groups.google.com/d/topic/islandora/Hp3kUYTJeWQ/discussion
Any ideas what's happening here, @mjordan?