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

オープン
#205 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
PHP
スター
156
フォーク
37
平均マージ
23時間 51分
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CollaboraOnline/richdocumentscode のほかの issue

CollaboraOnline/richdocumentscode の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。