Cannot upload files via SSH

Hi all,

I’m a new user with only a small amount of Linux and Self Hosting experience.
I am currently trying to copy and paste a directory containing some css files from a PC on my LAN to the ikiwiki themes folder on my FBX but I’m just getting “Permission Denied.”

As requested:

  • FBX connected to Home Router.
  • Purchased October 2020.
  • Running Version 20.15

What I’ve Tried

Accessing the Network Location from my Linux PC on LAN and pasting directly to the folder using Linux Mint’s file browser: Permission Denied.

Established and Confirmed a working SSH connection to FBX.

Attempted to copy and paste from Terminal on Linux PC on LAN using the following syntax:
scp -r < path to dir on localhost > user@ < host > : < path on remote host > /

Result: Permission Denied.

I am little more than a White Belt user of the command line and am sourcing my instructions from online tutorials. All help greatly appreciated!

Thanks in advance,

Clearmask

Update: Was able to transfer to /tmp folder so logged into shell in FBX and attempted to move the file. This didn’t work so I modified the permissions for that one folder manually using chmod. This worked but when I subsequently enabled the theme in ikiwiki nothing happened. Entirely possible I’ve misunderstood how to apply themes correctly. I just used the style.css file (and nothing else) from here: https://anarc.at/night_city/

Can somebody please advise on the steps I need to follow to customise ikiwiki?

All help greatly appreciated!

Can only guess, the user you logged in with seemed not to have write permission to the ikiwiki file location. I think ikiwiki would then also need read permissions to the new file. So maybe check that.

But I have no idea how to configure ikiwiki, it could still need some theme settings, thus looking for docs how to customize it could make sense.

PS: What’s with that avatar pic of yours?

Thanks for your response Nick.

Have been doing a bit of searching around and haven’t found quite what I need.

As a fairly non-technical user, I had expected reasonably common use cases like website hosting and blog customisation to be more clearly catered for in the web GUI/documentation. More than happy to put the time in and learn though. Are there any tutorials anywhere for this sort of thing?

So far, all I’ve found is this: https://njoseph.me/mediawiki/FreedomBox/Tips_and_Tricks

Personal website for each user
Every user on a FreedomBox gets the option to host a website by default.
Steps:

SSH into your FreedomBox
Create a directory called ~/public_html
Place the files of your website in the above directory

Your website will be available on the path ~username on your FreedomBox, e.g. https://familyname.host/~username

My avatar is a photo by Jorge Miguel Blazquez.
https://www.jorgemiguel.es/

Many thanks!

My knowledge of Ikiwiki is a bit rusty since I didn’t use it in a year or two.

As far as I know, there is a style.css which is the default minimalistic stylesheet and you’re allowed to add your customization into local.css which overrides style.css. Both files can be found under /var/www/ikiwiki/.

You can use chmod to ensure that local.css has the same file permissions as style.css.

Try reloading the Apache server using systemctl reload apache2 if it seems like your stylesheet isn’t being applied.

The above link seems to indicate that the plugin localstyle needs to be enabled, which we aren’t doing by default in FreedomBox. However, I don’t remember enabling it when I used Ikiwiki with a custom stylesheet.

Thanks Joseph - that’s really helpful.

Having tried one of the built in themes yesterday to no avail, I was surprised to see that it had been applied when I logged in for a quick look this morning. I have since observed that one needs to save the theme-change twice in order for it to apply (once to build, once to apply - I think). I also restarted the Freedombox and logged in on a different computer. Not sure if it was the restart that helped or the fact that I was viewing in a new browser, but I had once again successfully switched between the included themes. Perhaps I just needed to clear my browser cache.

Will go back through your message when I get off work and have a tinker.

Thanks for your help!

Yeah, unfortunately there seems to be no debian package yet, that could solve this.

But I checked https://www.getlektor.com and they now made a new release, so the next debian package update could actually include its web admin & editor. :slight_smile:

1 Like

Interesting! Thanks Nick. Had just started looking into Hugo: https://gohugo.io/ Lektor looks very similar. Will definitely do some reading on this. It might be a better option in the long run as it is written in Python - a language I recently set out to learn. I haven’t got very far yet but it might be a good match longer term if I set out to do something more adventurous. I’m also looking forward to having a go at scripting raw html (all in time). Do you have a FBX hosted site? If so, how did you approach it?

I recently stumbled on this, while going through the manual. Like most things, it seems simple when you know how.

Create a directory called ~/public_html
Place the files of your website in the above directory

This is frugally documented in the manual as User Websites section.

The source for our manual is our FreedomBox namespace in Debian wiki. Once you figure this out, you can add directions yourself to the Ikiwiki manual page of the doc and they will be released along with the software. :slight_smile:

1 Like

That’s great. Thanks Fioddor. I’d love to contribute. Will definitely keep this in mind. :slight_smile:

I don’t have a website hosted on FBX, but would like to if it is a static page generator that allows online editing. The freedombox.org website is already using lektor by the way.

If you want to try it out and maybe figure something out, there is also a lektor package in debian, but the admin/web-editing feature is not yet working.

https://bugs.debian.org/cgi-bin/pkgreport.cgi?package=lektor

Cheers Nick. I’ll give it some thought. I’m really not a coder but am hoping to learn. This might be a rather ambitious first project. :slight_smile: Re: Site building. I was thinking I’d just install lektor/hugo on my Linux desktop then move the exported html into the ~/public_html folder once I’d made something half decent. Now I have a basic workflow I’m less concerned with the Web-UI side of things. It’s all good fun. However, I agree that having an app baked in is a worthwhile goal for FBX and I’m glad it’s being considered. Clarity, convenience and ease of use will be paramount if this is to scale. Removing barriers (aptitude, time-to-invest, etc) will help it take root with a wider audience - though that hardly needs saying and I’m sure everyone here is working hard towards that goal. Glad that it exists and excited to be a part of it in whatever way I can.

1 Like