Feature request: Define unpacking location of AppImage by setting TMPDIR environment variable

Aberta
#205 2 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
php
Domínio
backend

Direção de pesquisa

Start by reading proxy.php, which the issue identifies as the place where TMPDIR could be set, and trace how the app's admin settings are stored and made available there. The requested outcome is a configurable extraction path that is used as TMPDIR when launching the AppImage; verify that the setting works and does not break the app's integrity checks.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

This might be somewhat of an edge case, but it'd be great if it was possible to define the path in which the AppImage extracts itself in case FUSE is unavailable.

Scenario: I'm running Nextcloud on a shared hosting provider's server which uses cPanel as management platform. By default, the AppImage extracts its contents into /tmp, which is mounted with noexec - apparently that's quite the default setup with cPanel. Obviously, the AppImage gets extracted, but the binaries inside can't be run which results in permission errors and of course the whole app not working.

On the other hand, binaries residing inside the "jail" of my hosting account (e.g. /home/myaccount/mybinarycollection/) can be run without any issues.

It is possible to achieve that by setting the environment variable TMPDIR in the context where the AppImage is executed. Problem is: In such a more or less restrictive environment, setting environment variables for the PHP processes as well as the exec()'d AppImage command is virtually impossible. I can't set environment variables for PHP in cPanel; I can't directly edit the php.ini; bash -c is non-login non-interactive, thus ignores .bashrc and .profile; /etc/environment is obviously read-only for me; etc.

So, as far as I'm concerned, the only way to reliably get this done is to set TMPDIR within proxy.php, either by putenv('TMPDIR=/home/myaccount/mybinarycollection')or by weaving it into $launchCmd. I successfully tried the putenv() method, but of course it breaks Nextcloud's code integrity check and will be overwritten with every update. Incorporating it into $launchCmd might be a safer call though, since putenv() might be disabled by hosting providers.

So my request would be to make the desired extraction path configurable in the app's admin backend and, if configured, have proxy.php set it as content of TMPDIR; of course given that you, dear developers, consider this an issue worth addressing.

Linguagem predominante
PHP
Estrelas
156
Forks
37
Merge médio
23h 51min
PRs com merge (30d)
2

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de CollaboraOnline/richdocumentscode

Todas as issues de CollaboraOnline/richdocumentscode

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.