Translations of this page:

Système de fichiers Vhffs

Prérequis

  • Paquets debian
 aptitude install libfuse2 libfuse-perl fuse-utils libfuse-dev libglib2.0-dev
  • Kernel

Il faut installer le module fuse pour utiliser vhffs

CONFIG_FUSE_FS=m

Compiler Vhffs-fs

cd [sources]/vhffs-fs/
sh rpcgen.sh
./configure --prefix=/usr
make clean
make
make install

Configuration

cp /etc/vhffs/vhffsfs.conf.dist /etc/vhffs/vhffsfs.conf

Editez le fichier /etc/vhffs/vhffs.conf

</global> 
   [...]
   # Whether to use vhffsfs or not. vhffsfs allows you to provide a
   # virtual home directory depending on the uid of the running process
   # in order to avoid using of a virtual chroot to provide ftp, sftp, or a shell
   use_vhffsfs             =       yes
</global> 

Editez le fichier /etc/vhffs/vhffsfs.conf

Créez un répertoire:

mkdir /home/hosted

Rajoutez dans /etc/fstab

vhffsfs      /home/hosted    fuse   defaults,allow_other,default_permissions,kernel_cache,noauto   0 0
Configuration de ftp

Modifiez le fichier /etc/pure-ftpd/db/postgresql.conf

Remplacez

PGSQLGetDir     SELECT homedir FROM vhffs_users, vhffs_object WHERE username='\L'  AND vhffs_users.object_id=vhffs_object.object_id AND vhffs_object.state='6'

par

PGSQLGetDir     SELECT '/home/hosted' AS homedir
Configuration nss pour utiliser ssh
  • nss-pgsql:

Remplacer

querypasswd = SELECT username, passwd, uid, gid, username, homedir, shell FROM vhffs_passwd

par

  querypasswd = SELECT username, passwd, uid, gid, username, 'home/hosted' AS homedir, shell FROM vhffs_passwd
  • sqlite: modifier le cron
perl nss-mirror.pl --force-homedir=/home/hosted 
fr/doc/guide/vhffs-file-system.txt · Last modified: 2007/11/08 00:31 by bm415
Recent changes RSS feed Creative Commons License Donate Driven by DokuWiki