User Tools

Site Tools


linux:sharepoint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:sharepoint [2021/11/24 15:22] Wulf Rajeklinux:sharepoint [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 135: Line 135:
  
 https://gist.github.com/kabili207/2cd2d637e5c7617411a666d8d7e97101 https://gist.github.com/kabili207/2cd2d637e5c7617411a666d8d7e97101
 +
 +Fuse config required for user systemd service:
 +<code - /etc/fuse.conf>
 +# Allow non-root users to specify the allow_other or allow_root mount options.
 +user_allow_other
 +</code>
  
 <code - rclone@.service> <code - rclone@.service>
Line 173: Line 179:
 </code> </code>
  
 +To hide Sharepoint's Forms directories, add:
 +<code>
 +    --exclude "/Forms/" \
 +</code>
 +
 +
 +====== WebDAV2 process ======
 +
 +#https://shui.azurewebsites.net/2018/01/13/mount-onedrive-for-business-on-headless-linux-vps-through-webdav/
 +
 +<code>
 +sudo apt-get install -y davfs2
 +#unprivileged users: yes
 +sudo chmod 777 /etc/davfs2/davfs2.conf
 +echo "use_locks 0" >> /etc/davfs2/davfs2.conf
 +
 +wget https://raw.githubusercontent.com/yulahuyed/test/master/get-sharepoint-auth-cookie.py
 +
 +python get-sharepoint-auth-cookie.py https://SHAREPOINTSITE USERNAME PASSWORD > cookie.txt
 +
 +sed -i "s/ //g" cookie.txt
 +COOKIE=$(cat cookie.txt)
 +sudo chmod 777 /etc/davfs2/davfs2.conf
 +for MPATH in {Funds/Funds,IT/IT,Research/Research,SalesSP/Sales}
 +do
 +  echo "[${MPATH}]" >> /etc/davfs2/davfs2.conf
 +  echo "add_header Cookie ${COOKIE}" >> /etc/davfs2/davfs2.conf
 +  echo "" >> /etc/davfs2/davfs2.conf
 +done
 +
 +for MPATH in {Funds/Funds,IT/IT,Research/Research,SalesSP/Sales};
 +do
 +  echo "https://SITENAME.sharepoint.com/sites/${MPATH} USERNAME PASSWORD" >> /etc/davfs2/secrets
 +done
 +
 +sudo chmod 755 /etc/davfs2/davfs2.conf
 +
 +sudo usermod -a -G davfs2 $USER
 +
 +#apply the new group in the shell
 +su - $USER
 +
 +for PATH in {funds,it,research,sales};
 +do
 +  mkdir -p ~/sharepoint/SITE-${PATH}
 +  mount ~/sharepoint/SITE-${PATH}/
 +done;
 +</code>
 +
 +The cookie will become invalid after about 3 weeks of inactivity.
 +
 +fstab entry example
 +<code>
 +https://SITENAME.sharepoint.com/sites/sitename/foldername /home/USER/sharepoint/SITE-SITENAME davfs users,rw,_netdev 0 0
 +</code>
 +
 +https://wiki.archlinux.org/title/Davfs2
linux/sharepoint.1637767360.txt.gz · Last modified: (external edit)