[Freedombox-discuss] Mediawiki - no access rights for images

permondes - sagen sagen at permondes.de
Thu Aug 9 19:39:37 BST 2018


Thanks Joseph, that did it. You can see it by yourself: https://permond
es.de/mediawiki/index.php/Basteln
So I am one of the first to use mediawiki with uploads? Debugging is
the fate of the early adopters. :-)
	Dietmar
Am Donnerstag, den 09.08.2018, 16:04 +0000 schrieb Joseph Nuthalapati:
> Dietmar,
> 
> Thanks for reporting this issue. I've just raised a merge request
> on Debian Salsa with the fix [1]. It should be automatically
> applied when your FreedomBox upgrades to version 0.36.0.
> 
> I've added an additional Apache configuration file called
> mediawiki-freedombox.conf in the last release. It has the
> following lines in it.
> 
> <Directory /var/lib/mediawiki/>
>     <IfModule mod_rewrite.c>
>         RewriteEngine On
>         RewriteRule ^/index.php/(.*)$ /$1 [R,L]
>         RewriteCond %{REQUEST_FILENAME} !-f
>         RewriteCond %{REQUEST_FILENAME} !-d
>         RewriteRule ^(.*)$ index.php [L]
>     </IfModule>
> </Directory>
> 
> This file overrides Debian's MediaWiki configuration in
> mediawiki.conf. You can find both of these files in the directory
> /etc/apache2/conf-available on your FreedomBox.
> 
> The fix is to append the following configuration to the file
> mediawiki-freedombox.conf
> 
> <Directory /var/lib/mediawiki/images>
>     <IfModule mod_rewrite.c>
>         RewriteEngine Off
>     </IfModule>
> </Directory>
> 
> <Directory /var/lib/mediawiki/uploads>
>     <IfModule mod_rewrite.c>
>         RewriteEngine Off
>     </IfModule>
> </Directory>
> 
> I have attached the file to this email so that you can directly
> scp it into your FreedomBox and copy it to
> /etc/apache2/conf-available. The next upgrade of FreedomBox will
> be shipped with the same file, so the upgrade should be smooth.
> 
> After copying the file, you can issue the command "systemctl
> reload apache2" through an ssh session to your FreedomBox.
> Another approach is to enable and disable MediaWiki from the
> FreedomBox web UI, which will have the same effect.
> 
> P.S. Enabling file uploads was implemented in Plinth 0.35.0, but
> we didn't add a functional test for it. I've rectified the
> mistake this time so that we can immediately catch it if this
> feature ever breaks.
> 
> 
> 1.
> https://salsa.debian.org/freedombox-team/plinth/merge_requests/1307
> 
> 
> permondes - sagen <sagen at permondes.de> wrote:
> > Changing the subject of the mail as I think this is an access
> > right issue introduced by Plinth 0.35. Read access to the
> > mediawiki should be available for anyone. Even logged in to
> > mediawiki the images are not visible.Checking some directories:
> > > @freedombox:/var/lib/mediawiki$ ls -al 
> > > ...
> > > drwx------ 1 www-data www-data 106 Jul 22 17:06 images
> > 
> > Is it correct that the owner of the images folder is
> > "www-data"? And only the owner has access, not the group, nor
> > anyone else? For the individual images rights are:
> > > @freedombox:/var/lib/mediawiki$ sudo ls -al images/0/01
> > > insgesamt 36
> > > drwxr-xr-x 1 www-data www-data    44 Jun 21 20:58 .
> > > drwxr-xr-x 1 www-data www-data     8 Aug  2 21:07 ..
> > > -rw-r--r-- 1 www-data www-data 32863 Jun 21 20:58
> > > Fadenbild_genagelt.jpg
> > 
> > which looks okay.
> > Checking
> > https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
> > :
> > > Check directory security...
> > > Set the /images folder (or the /uploads folder in previous
> > > versions)
> > > to have permission "755":
> > > 
> > > 
> > > 
> > > User can read, write and execute;Group can read and execute;
> > > World can read and execute.
> > 
> > So the rights of the 'images' folder are set wrong, am I right?
> > Should it be drwxr-xr-x?Was there an change on this in Plinth
> > 0.35?Is it save for me to try this change? Thanks for your help
> > Dietmar
> > 
> > Am Dienstag, den 07.08.2018, 21:24 +0200 schrieb permondes -
> > sagen:
> > > I just observe that all images in my Mediawiki are gone or cannot
> > > be
> > > displayed any more. I am not sure since when this is, I just
> > > found
> > > that imagemagick was updated 4 days ago:
> > > 
> > > ' 2018-08-03 06:26:18,634 INFO Packages that will be upgraded:
> > > bsdutils fdisk imagemagick imagemagick-6-common imagemagick-6.q16
> > > libblkid1 libfdisk1 libimage-magick-perl libimage-magick-q16-perl
> > > libmagickcore-6.q16-6 libmagickcore-6.q16-6-extra libmagickwand-
> > > 6.q16-6 libmount1 libsmartcols1 libsocket6-perl libuuid1 login
> > > mount
> > > passwd python-cryptography python3-cryptography rfkill util-
> > > linux-- 
> > > 
> > > Mediainformation in Firefox gives an image size of 0px x 0px or
> > > type
> > > text (no wonder). 
> > > Checking all files (see https://permondes.de/mediawiki/Spezial:Da
> > > teie
> > > n ) I get the error message
> > > > You don't have permission to access
> > > > /mediawiki/images/5/59/Tor_-
> > > > _klein.JPG
> > > > on this server.
> > > 
> > > So, some change of permissions? Maybe with the last Plinth?
> > > 
> > > Here is how ugly the wiki looks like now: https://permondes.de/me
> > > diaw
> > > iki/index.php/Basteln
> > > 
> > > 	Dietmar
> > > 
> > > FreedomBox: https://permondes.de
> > > _______________________________________________
> > > Freedombox-discuss mailing list
> > > Freedombox-discuss at alioth-lists.debian.net
> > > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/freedomb
> > > ox-d
> > > iscuss_______________________________________________
> > 
> > Freedombox-discuss mailing list
> > Freedombox-discuss at alioth-lists.debian.net
> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/freedombox
> > -discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/freedombox-discuss/attachments/20180809/cc71db68/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: face-smile.png
Type: image/png
Size: 1057 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/freedombox-discuss/attachments/20180809/cc71db68/attachment.png>


More information about the Freedombox-discuss mailing list