Hello there.
I was able to integrate SharePoint using rclone with the webdav protocol. Here are the instructions I used for CentOS. I threw this together hastily, so let me know if you have issues.
Webdav worked well. The only issue I had is that periodically I would need to reauthenticate with SharePoint.
Oh, and I also had to disable Object Counting in Archivematica otherwise the storage service freezes when clicking BROWSE on AM Dashboard. It can be found under the Storage Service administrative interface. Just check the "Object counting in spaces is disabled."
**How to mount SharePoint Online on CentOS (Linux, using webdav via rclone)**
1. Install latest version of rclone (repository version may be too old,
so may have to do this manually from rclone's website)
2. Login as archivematica user (or whatever account is used for managing archivematica on the server)
3. Configure rclone to connect to SharePoint `rclone config`
a. Press 'n' to create new remote
b. Give remote a name (e.g. sharepoint)
c. Type number for webdav (number 46 at time of this writing)
d. Paste URL to SharePoint archive site:
https://your.sharepoint.com/sites/Your-Site-Name/Shared%20Documents (Can keep adding subdirectories if wanted)
e. Enter username with with permission to access the SharePoint directory (ensure @
domain.edu is appended)
f. Choose No, leave this optional password blank (default)
g. Press enter to leave bearer_token empty
h. Press 'n' to skip editing advanced config
i. Press 'y' for Yes this is OK (default)
3. Create SharePoint directory and assign permissions
```
mkdir /mnt/sharepoint
chown -r archivematica:archivematica /mnt/sharepoint
chomod -R 755 /mnt/sharepoint
```
>[!note] If you have a different user than archivematica, you would use `chown -r username:username /mnt/sharepoint` instead.
1. Create rclonemount service
```
vim /etc/systemd/system/rclonemount.service
```
5. Paste the following and save:
```
[Unit]
Description=rclonemount
AssertPathIsDirectory=/mnt/sharepoint
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
--config=/home/archivematica/.config/rclone/rclonemount.conf \
--vfs-cache-mode full \
# --ignore-size \
# --ignore-checksum \
# --update \
REMOTE-NAME: /mnt/sharepoint
ExecStop=/bin/fusermount -u /mnt/sharepoint
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
```
6. Enable system --user command for archivematica account.
`sudo loginctl enable-linger archivematica`
- Enable the new service and start it
```
systemctl daemon-reload
systemctl --user enable rclonemount
systemctl --user start rclonemount
```
10. Test the configuration: `rclone lsd remote_name:`
>[!note] Don't forget the colon at the end
11. Mount SharePoint site using rclone: `rclone mount remote_name: /mnt/sharepoint --vfs-cache-mode full --daemon`
12. Enable SharePoint site mount using `XDG_RUNTIME_DIR=/run/user/\$(id -u \$otherUser) systemctl --user start rclonemount.service`
13. Test mount worked: `ls /mnt/sharepoint`
14. To reconnect rclone: `rclone config reconnect remote_name:` OR `rclone mount remote_name: /mnt/directoryname/ \--vfs-cache-mode full --daemon`