FeatherWiki: Regular user cannot save to server

Hi all.

  • FreedomBox v24.20.1 on Debian Bookworm, installed via apt

I’ve installed FeatherWiki and created a new empty wiki from plinth using my “admin” account:


As per the docs (selected text in the screenshot above), every user in the “wiki” group is supposed to be able to edit and save the wiki files on the server.

However, this option only appears for my “admin” account (red button):


But it does not for my regular user with the “wiki” group:

Permissions for my regular, non-privileged user:

I can see the “wiki” group on the “auth_pubtkt” cookie submitted in my HTTP headers and I am also using MediaWiki with this user account successfully.


Does anybody know how I can use FeatherWiki with a non-privileged user account, saving the changed wiki files to the server? What condition makes the “Save Wiki to server” button appear?

Thanks for any advice!

Cheers,
Axel

@kopfkind Thanks for the very detailed report.

I tried to reproduce this today on the latest version of FreedomBox (24.22) on Debian testing. It works as expected. A user of the “wiki” group can edit the files and save them to the server.

I couldn’t reproduce this on a FreedomBox running on Debian stable either.

This image doesn’t look like the latest version of Feather Wiki. It is possible that you are running a version of Feather Wiki that doesn’t support saving to servers.

  1. Did you test by uploading an existing file when using the non-admin user?
  2. In your test, are you accessing the same file using “admin” and the non-admin user?

If you have older Feather Wiki files, the manual page has instructions on how to import them into your FreedomBox.

When Feather Wiki makes an OPTIONS request to the server, the response from the server should contain "dav": 1 in the headers. There are some older versions of Feather Wiki meant for local use only, where they won’t make this request. If you created a new file from FreedomBox, it should be a version that allows saving to server.

If you don’t mind, can you post the Feather Wiki file where you have this problem? Or click on “Wiki Settings”, scroll to the end of the page and ensure that the version you see there is “1.8.0”.

Sorry for the late response.

1 Like

Hi Joseph, thank you for your kind and thoughtful reply!

It finally put me on the right track, and it’s definitely a border case.

Tl;dr: Don’t use index.html as the file name for your feather wiki when creating it on plinth (or use the full path when opening it).

After below analysis when I finally tried reinstalling through plinth, I was wondering if the wiki’s file name may have an effect, and indeed it did. When I first set up a feather wiki I wanted to be smart and used index.html as filename, so it would open automatically (since index.html is configured as default directory index on apache).

I learned:

Opening the wiki with full filename does the trick.

Thanks again Joseph!

Cheers,
Axel


For documentation purposes, here’s what I checked before finding the culprit:

====================

I am running FeatherWiki 1.8.0 according to the settings page, and I can also see the OPTIONS requests in the browser’s developer tools when opening the wiki. However, the server response does not include the "dav": 1 header you mentioned:

I verified using two browsers (Firefox and a vanilla Chromium to make sure no extensions interfere).


Looking at Apache config I can see the required settings:

kopfkind@fbox:/etc/apache2 $ grep -A 3 -B 3 Dav conf-enabled/featherwiki-freedombox.conf 
</Location>

<Directory /var/lib/featherwiki>
    Dav On

    # Don't accept overrides in .htaccess
    AllowOverride None

kopfkind@fbox:/etc/apache2 $ ls -ld /var/lib/featherwiki/
drwxr-xr-x 2 www-data www-data 4096 Oct  2 16:45 /var/lib/featherwiki/

kopfkind@fbox:/etc/apache2 $ ls -l /var/lib/featherwiki/
total 60
-rw-r--r-- 1 www-data www-data 59416 Oct  2 16:45 index.html

I installed freedombox via apt and apache2 came as dependency:

kopfkind@fbox:/etc/apache2 $ dpkg -l apache2
...
ii  apache2        2.4.62-1~deb12u2 arm64        Apache HTTP Server

Reloading/restarting the service and also rebooting the OS does not change the missing "dav": 1 here. The module mod_dav_fs is enabled and loaded, too.

I start scratching my head here :confused:

I enabled verbose logging and restarted the service again, but there’s nothing in the logs that looks suspicious, no errors, either.

I’ll try de-installing and re-installing the application from plinth …

1 Like