mirror of
https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh.git
synced 2024-09-03 20:26:26 +02:00
Update package
This commit is contained in:
parent
2c8a63bd65
commit
cf11cbe0c2
5 changed files with 211 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
[](https://ci-apps.yunohost.org/jenkins/job/ssh_chroot_dir%20%28Community%29/lastBuild/consoleFull)
|
[](https://ci-apps.yunohost.org/jenkins/job/ssh_chroot_dir%20%28Community%29/lastBuild/consoleFull)
|
||||||
[](https://install-app.yunohost.org/?app=ssh_chroot_dir)
|
[](https://install-app.yunohost.org/?app=ssh_chroot_dir)
|
||||||
**This app can't be tested automatically. Because it's impossible to use modprobe in a lxc container, and there's no fstab to tweak.
|
> **This app can't be tested automatically. Because it's impossible to use modprobe in a lxc container, and there's no fstab to tweak.
|
||||||
So, the tests fail each time...
|
So, the tests fail each time...
|
||||||
The level is fixed at 3 by manual tests.**
|
The level is fixed at 3 by manual tests.**
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ The level is fixed at 3 by manual tests.**
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This app create a directory for an user, to allow him to put in here his backup (or whatever he want).
|
|
||||||
|
This app create a directory for an user, to allow him to put in here his backups (or whatever he want).
|
||||||
This directory is accessible by ssh or sftp.
|
This directory is accessible by ssh or sftp.
|
||||||
The directory is highly secured by a complete chroot with limited commands available. So the user can't go out of his directory and can't use any other command which not allowed.
|
The directory is highly secured by a complete chroot with limited commands available. So the user can't go out of his directory and can't use any other command which not allowed.
|
||||||
In addition to the chroot, the user has a limited space available.
|
In addition to the chroot, the user has a limited space available.
|
||||||
|
@ -42,6 +43,8 @@ Only by installing this app for each user.
|
||||||
* No backup and restore script.
|
* No backup and restore script.
|
||||||
* Can't be tested by package check.
|
* Can't be tested by package check.
|
||||||
|
|
||||||
|
## Additionnal informations
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh/issues
|
* Report a bug: https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh/issues
|
||||||
|
|
54
README_fr.md
Normal file
54
README_fr.md
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
# Chroot ssh directory pour YunoHost
|
||||||
|
|
||||||
|
[](https://ci-apps.yunohost.org/jenkins/job/ssh_chroot_dir%20%28Community%29/lastBuild/consoleFull)
|
||||||
|
[](https://install-app.yunohost.org/?app=ssh_chroot_dir)
|
||||||
|
> **Cette application ne peut pas être testée automatiquement. Parce qu'il est impossible d'utiliser modprobe dans un conteneur lxc, et qu'il n' y a pas de fstab à modifier.
|
||||||
|
Donc, les tests échouent à chaque fois...
|
||||||
|
Le niveau est fixé à 3 par des tests manuels.**
|
||||||
|
|
||||||
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
|
> *Ce package vous permet de créer un répertoire avoir un chroot ssh rapidement et simplement sur un serveur YunoHost.
|
||||||
|
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
|
## Résumé
|
||||||
|
|
||||||
|
Cette application crée un répertoire pour un utilisateur, pour lui permettre de mettre ici ses sauvegardes (ou ce qu'il veut).
|
||||||
|
Ce répertoire est accessible par ssh ou sftp.
|
||||||
|
Le répertoire est hautement sécurisé par un chroot complet avec des commandes disponibles limitées. Ainsi, l'utilisateur ne peut pas sortir de son répertoire et ne peut utiliser aucune commandes qui ne soit pas autorisée.
|
||||||
|
En plus du chroot, l'utilisateur dispose d'un espace limité.
|
||||||
|
|
||||||
|
Ainsi, vous pouvez fournir à un utilisateur distant une partie limitée de votre disque dur pour lui permettre de mettre sa sauvegarde, sans aucun risque pour votre propre serveur.
|
||||||
|
|
||||||
|
**Version embarquée:** 1.1
|
||||||
|
|
||||||
|
## Captures d'écran
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer.
|
||||||
|
|
||||||
|
## Fonctionnalités spécifiques à YunoHost
|
||||||
|
|
||||||
|
#### Support multi-utilisateurs
|
||||||
|
|
||||||
|
Seulement en installant cette application pour chaque utilisateur.
|
||||||
|
|
||||||
|
#### Architectures supportées.
|
||||||
|
|
||||||
|
* Testé sur x86_64
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
* Pas de script de backup et restore.
|
||||||
|
* Ne peut pas être testé avec package check.
|
||||||
|
|
||||||
|
## Informations additionnelles
|
||||||
|
|
||||||
|
## Liens
|
||||||
|
|
||||||
|
* Reporter un bug: https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh/issues
|
||||||
|
* Site de ssh_chroot: https://github.com/maniackcrudelis/ssh_chroot
|
||||||
|
* Site de YunoHost: https://yunohost.org/
|
117
YEP.md
Normal file
117
YEP.md
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
#### [Level 0](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-0)
|
||||||
|
[YEP 1.1 - Nommer son app et son dépot](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11)
|
||||||
|
`Validated`
|
||||||
|
[YEP 1.2 - Inscrire l'app sur un "répertoire" connu](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-12)
|
||||||
|
`Validated`
|
||||||
|
|
||||||
|
#### [Level 1](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-1)
|
||||||
|
[YEP 2.2 - Utiliser bash pour les scripts principaux](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-22)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.5 - Copier correctement des fichiers](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-25)
|
||||||
|
`Don't know`
|
||||||
|
[YEP 2.7 - Donner des permissions suffisantes aux instructions bash](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-27)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.15 - Suivre les instructions d'installation de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-215)
|
||||||
|
`Validated`
|
||||||
|
|
||||||
|
#### [Level 2](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-2)
|
||||||
|
[YEP 1.5 - Mettre à jour régulièrement le statut de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.18.2 - Gérer l'installation à la racine d’un nom de domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2182)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 2.18.3 - Gérer l'installation sur un sous-domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2183)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 2.18.4 - Gérer l'installation sur un chemin /path](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2184)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 4.6 - Gère le multi-instance](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11)
|
||||||
|
`Validated` - *Automatically verified.*
|
||||||
|
|
||||||
|
#### [Level 3](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-3)
|
||||||
|
[YEP 2.3 - Sauvegarder les réponses lors de l'installation](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-23)
|
||||||
|
`Validated`
|
||||||
|
|
||||||
|
#### [Level 4](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-4)
|
||||||
|
[YEP 4.1 - Lier au ldap](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-41)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 4.2 - Lier l'authentification au sso](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-42)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
#### [Level 5](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-5)
|
||||||
|
[YEP 1.3 - Indiquer la licence associée au paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.1 - Respecter le format du manifeste](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-21)
|
||||||
|
`Validated` - *Automatically verified.*
|
||||||
|
[YEP 2.12 - Utiliser les commandes pratiques (helpers)](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-212)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.18.1 - Lancer le script d'installation d'une webapp correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2181)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
#### [Level 6](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-6)
|
||||||
|
[YEP 1.4 - Informer sur l'intention de maintenir un paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-14)
|
||||||
|
`Validated`
|
||||||
|
[YEP 1.6 - Se tenir informé sur l'évolution du packaging d'apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-16)
|
||||||
|
`Validated`
|
||||||
|
[YEP 1.7 - Ajouter l'app à l'organisation YunoHost-Apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-17)
|
||||||
|
`Validated` - *Automatically verified.*
|
||||||
|
[YEP 1.8 - Publier des demandes de test](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-18)
|
||||||
|
`Validated`
|
||||||
|
[YEP 1.9 - Documenter l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-19)
|
||||||
|
`Not yet validated`
|
||||||
|
[YEP 1.10 - Garder un historique de version propre](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-110)
|
||||||
|
`Don't know`
|
||||||
|
[YEP 2.9 - Enlever toutes traces de l'app lors de la suppression](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-29)
|
||||||
|
`Validated`
|
||||||
|
[YEP 3.3 - Faciliter le contrôle de l'intégrité des sources](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-33)
|
||||||
|
`Validated`
|
||||||
|
[YEP 3.5 - Suivre les recommendations de la documentation de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-35)
|
||||||
|
`Validated`
|
||||||
|
[YEP 3.6 - Mettre à jour les versions contenant des CVE](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-36)
|
||||||
|
`Validated`
|
||||||
|
[YEP 4.3 - Fournir un script de sauvegarde YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-43)
|
||||||
|
`Not yet validated`
|
||||||
|
[YEP 4.4 - Fournir un script de restauration YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-44)
|
||||||
|
`Not yet validated`
|
||||||
|
|
||||||
|
#### [Level 7](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-7)
|
||||||
|
[YEP 2.6 - Annuler l'action si les valeurs d'entrées sont incorrectes](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-26)
|
||||||
|
`Validated`
|
||||||
|
[YEP 3.2 - Ouvrir un port correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-32)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
#### [Level 8](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-8)
|
||||||
|
[YEP 2.4 - Détecter et gérer les erreurs](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-24)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.8 - Modifier correctement une configuration système](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-28)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.16 - Vérifier la disponibilité des dépendances sur ARM, x86 et x64](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-216)
|
||||||
|
`Not yet validated` - *Automatically verified.*
|
||||||
|
[YEP 2.18.5 - Gérer la tuile YunoHost pour faciliter la navigation entre les applications](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2185)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 3.4 - Isoler l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-34)
|
||||||
|
`Validated`
|
||||||
|
[YEP 4.5 - Utiliser les hooks](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-45)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
#### [Level 9](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-9)
|
||||||
|
[YEP 2.10 - Configurer les logs de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-210)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 2.11 - Utiliser une variable plutôt que l'app id directement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-211)
|
||||||
|
`Validated`
|
||||||
|
[YEP 2.13 - Traduire le paquet en anglais](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-213)
|
||||||
|
`Not yet validated`
|
||||||
|
[YEP 2.14 - Remplir correctement un fichier de conf](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-214)
|
||||||
|
`Not yet validated`
|
||||||
|
[YEP 2.17 - Prendre en compte la version d'origine lors des mises à jour](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-217)
|
||||||
|
`Validated`
|
||||||
|
[YEP 4.2.1 - Déconnexion](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-421)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
#### Other YEP
|
||||||
|
[YEP 3.1 - Ne pas demander ou stocker de mot de passe LDAP](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-31)
|
||||||
|
`Validated`
|
||||||
|
[YEP 4.7 - Ajouter un module à la CLI](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-47)
|
||||||
|
`Not applicable`
|
||||||
|
[YEP 4.8 - Ajouter un module à l'admin web](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-48)
|
||||||
|
`Not applicable`
|
||||||
|
|
||||||
|
State of each YEP can be one of these: `Validated`, `Partially validated`, `Not yet validated`, `Not applicable`, `Don't know`.
|
|
@ -1,8 +1,3 @@
|
||||||
# See here for more informations
|
|
||||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
|
||||||
|
|
||||||
# Move this file from check_process.default to check_process when you have filled it.
|
|
||||||
|
|
||||||
;; Test complet
|
;; Test complet
|
||||||
; Manifest
|
; Manifest
|
||||||
ssh_user="testuser"
|
ssh_user="testuser"
|
||||||
|
@ -17,7 +12,7 @@
|
||||||
setup_public=0
|
setup_public=0
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=0
|
backup_restore=0
|
||||||
# multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=0
|
incorrect_path=0
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=0
|
change_url=0
|
||||||
|
|
|
@ -53,7 +53,7 @@ CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
IS_PACKAGE_CHECK () { # Détermine une exécution en conteneur (Non testé)
|
IS_PACKAGE_CHECK () { # Détermine une exécution en conteneur (Non testé)
|
||||||
return $(uname -n | grep -q 'pchecker_lxc')
|
return $(uname -n | grep -c 'pchecker_lxc')
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -78,6 +78,19 @@ node_version_path="/opt/node_n/n/versions/node"
|
||||||
# N_PREFIX est le dossier de n, il doit être chargé dans les variables d'environnement pour n.
|
# N_PREFIX est le dossier de n, il doit être chargé dans les variables d'environnement pour n.
|
||||||
export N_PREFIX="$n_install_dir"
|
export N_PREFIX="$n_install_dir"
|
||||||
|
|
||||||
|
ynh_install_n () {
|
||||||
|
echo "Installation of N - Node.js version management" >&2
|
||||||
|
# Build an app.src for n
|
||||||
|
mkdir -p "../conf"
|
||||||
|
echo "SOURCE_URL=https://github.com/tj/n/archive/v2.1.7.tar.gz
|
||||||
|
SOURCE_SUM=2ba3c9d4dd3c7e38885b37e02337906a1ee91febe6d5c9159d89a9050f2eea8f" > "../conf/n.src"
|
||||||
|
# Download and extract n
|
||||||
|
ynh_setup_source "$n_install_dir/git" n
|
||||||
|
# Install n
|
||||||
|
(cd "$n_install_dir/git"
|
||||||
|
PREFIX=$N_PREFIX make install 2>&1)
|
||||||
|
}
|
||||||
|
|
||||||
ynh_use_nodejs () {
|
ynh_use_nodejs () {
|
||||||
nodejs_version=$(ynh_app_setting_get $app nodejs_version)
|
nodejs_version=$(ynh_app_setting_get $app nodejs_version)
|
||||||
|
|
||||||
|
@ -113,9 +126,10 @@ ynh_install_nodejs () {
|
||||||
test -x /usr/bin/npm && mv /usr/bin/npm /usr/bin/npm_n
|
test -x /usr/bin/npm && mv /usr/bin/npm /usr/bin/npm_n
|
||||||
|
|
||||||
# If n is not previously setup, install it
|
# If n is not previously setup, install it
|
||||||
n --version > /dev/null 2>&1 || \
|
if ! test n --version > /dev/null 2>&1
|
||||||
( echo "Installation of N - Node.js version management" >&2; \
|
then
|
||||||
curl -sL $n_install_script | N_PREFIX=$N_PREFIX bash -s -- -y - 2>&1 )
|
ynh_install_n
|
||||||
|
fi
|
||||||
|
|
||||||
# Modify the default N_PREFIX in n script
|
# Modify the default N_PREFIX in n script
|
||||||
ynh_replace_string "^N_PREFIX=\${N_PREFIX-.*}$" "N_PREFIX=\${N_PREFIX-$N_PREFIX}" "$n_install_dir/bin/n"
|
ynh_replace_string "^N_PREFIX=\${N_PREFIX-.*}$" "N_PREFIX=\${N_PREFIX-$N_PREFIX}" "$n_install_dir/bin/n"
|
||||||
|
@ -219,3 +233,19 @@ EOF
|
||||||
|
|
||||||
chmod +x "/etc/cron.daily/node_update"
|
chmod +x "/etc/cron.daily/node_update"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
#============= FUTURE YUNOHOST HELPER ============
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Delete a file checksum from the app settings
|
||||||
|
#
|
||||||
|
# $app should be defined when calling this helper
|
||||||
|
#
|
||||||
|
# usage: ynh_remove_file_checksum file
|
||||||
|
# | arg: file - The file for which the checksum will be deleted
|
||||||
|
ynh_delete_file_checksum () {
|
||||||
|
local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_'
|
||||||
|
ynh_app_setting_delete $app $checksum_setting_name
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue