[moin-user] Can't install package: "Unhandled Exception"

Paul Boddie paul at boddie.org.uk
Sun Jul 2 13:46:41 EDT 2017


On Sunday 2. July 2017 18.40.19 Volker Wysk wrote:
> 
> I've tried packages.py, and it worked, a little:

[...]

> /home/v/tmp/moinmoin % sudo -u www-data /home/v/tmp/moinmoin/inst.sh

[...]

> action add attachment: not enough rights - nothing done
> 
> 
> /home/v/tmp/moinmoin % sudo /home/v/tmp/moinmoin/inst.sh

[...]

> action add attachment: not enough rights - nothing done

So, we can see here that neither root nor www-data will get around this 
permission error. This means that it isn't a system-level privilege issue.

> So why are there insufficient rights? How does one specify the (super) user
> to use, when installing via packages.py? The only wiki page dealing with
> it seems to be HelpOnPackageInstaller, and that's incomplete.

What seems to be happening is that the package installer cannot gain 
sufficient wiki-level privileges. You may be familiar with ACLs within the 
wiki, but they also apply for command line operations, too. (This actually 
might also be the reason why the through-the-Web operation failed.)

> > For me, this almost always works, where failure is usually something to
> > do with the permissions.
> 
> Yes, seems the same, here.

For me, it's usually forgetting the system-level privileges, though. ;-)

You might want to check your wikiconfig.py file (or other configuration file) 
to see what the ACL-related settings say. I'm not completely sure that the 
installer tries to become superuser, which is what some tools do to avoid 
these kinds of problems.

Paul

P.S. I actually wrote an extension that queues edits that are submitted to a 
wiki, and I seem to recall that even the installer had its edits queued. So 
the mechanisms around editing are pretty general. Of course, modifying the 
filesystem directly is an alternative, as previously mentioned, but I don't 
think that Moin exposes that functionality very conveniently, and it could be 
awkward to get everything right doing it yourself.


More information about the moin-user mailing list