OK it works, I think..

To recap, I am using Publii and wanted to publish directly from my desktop to my web-server space, I thought I would be able to use dolphin's network folder feature to do this. 

I failed to do that...  enter sshfs 

With sshfs you can mount a remote folder within your local file system using ssh (it also uses pubkey based authentication so set this up first)

Server preparation: My server's webspace 'public_html' is owned by my web control panel/webserver user, which is not the same as my ssh user, so I was not able to write here as an unprivileged user, I did not want to chmod777 the folder so instead I found setfacl

setfacl allows you to selectively give users read, write and execute/search permissions to specific files and folder locations, to allow my ssh user access to the folder I needed to do the following 

setfacl -R -m u:<user>:rwx /path/to/public_html

here's a breakdown of what this does

-Rthis makes the command recursive so <user> can access the folder content
-mthis issues teh instruction to modify the target 
u:<user>the user to be given the permissions (replace <user> with teh username eg: jase
:rwxthe permissions required by the user (r)ead (w)rite e(x)ecute/search
paththe location of the folder to be affected

Now that the folder had been prepared I needed to set up sshfs to mount the folder my static site generator 'publishes' to (I an currently using Publii so my export location may be different to yours - yes you could probably use this for any SSG) 

I did this by creating a fresh text file and call it something like 'mountblogspace.sh'

Then opened 'mountblogspace.sh' in an editor and added the following as a template for your 

sshfs <user>@<url or ipaddress>:/path/to/public_html/ ~/Documents/Publii/sites/my-blogging-feedbackloop/output

When launched by typing

sh mountblogspace.sh

This will make a connection via ssh to the server and then mount the remote location on the local machine at the destination folder listed, allowing local operation on teh remote folder. 

OK that the theory anyway and where I am right now. 

I am not sure how long this will be how I blog, I just like it right now. 

If you have any comments please give me a shout on the fediverse at @[email protected] 

EDIT 19/03/22 - updating publii seems to cause an issue with permissions of the output folder, which causes issues with publishing my blog as described above, as it runs on my local machine in an appimage and is doing a pretty good job at the moment I will continue using version 0.38 for this blog (until i find a better solution that suits me). 

 

 

This article was updated on Saturday, 19 March 2022

jase