Résumé: Ce document decrit la publication et le fonctionnement du service de pages web individuelles (page perso, cours ....).
webspace.int-evry.fr dans les répertoire cours et/ou public et se consulte respectivement sur les serveurs www-cours.int-evry.fr et www-public.int-evry.fr. Les exemples et captures d'ecrans d'usage de ce services dans cette documentation font reference à l'espace public (perso), pour la publication et la consultation des cours, c'est exactement le meme principe, il suffit de remplacer www-public par www-cours !.\\webspace.int-evry.fr\login\ où login correspond à votre nom d'utilisateur système. Cliquer sur terminer, une fenêtre de saisie du mot de passe apparait, il faut mettre le mot de passe de l'annuaire ldap (monde unix = celui de la messagerie) .






$ smbclient //webspace.int-evry.fr/procacci -U procacci
Password:
Domain=[MICRO] OS=[Unix] Server=[Samba 3.0.14a-2]
smb: \> ls public/*
. D 0 Wed May 31 10:38:28 2006
.. D 0 Wed May 31 11:39:04 2006
cgi D 0 Wed May 31 10:37:40 2006
index.html 1707 Mon Jan 30 15:22:48 2006
index.php3 A 15 Fri Jan 27 16:28:24 2006
ipv6.html A 21624 Wed Jan 11 18:14:28 2006
logs D 0 Thu Mar 9 09:48:01 2006
phpinfo.php A 15 Fri Jan 27 16:27:32 2006
restricted D 0 Thu Mar 30 12:01:46 2006
shibboleth D 0 Wed May 3 13:05:56 2006
50395 blocks of size 2097152. 45592 blocks available
|
$ mount -t smbfs -o username=procacci,workgroup=micro //webspace.int-evry.fr/procacci /mnt/smb Password: $ ls -l /mnt/smb/public total 52 drwxr-xr-x 1 root root 0 May 31 10:37 cgi -rwxr-xr-x 1 root root 1707 Jan 30 14:22 index.html -rwxr-xr-x 1 root root 15 Jan 27 15:28 index.php3 -rwxr-xr-x 1 root root 21624 Jan 11 17:14 ipv6.html drwxr-xr-x 1 root root 0 Mar 9 08:48 logs -rwxr-xr-x 1 root root 15 Jan 27 15:27 phpinfo.php drwxr-xr-x 1 root root 0 Mar 30 12:01 restricted drwxr-xr-x 1 root root 0 May 3 13:05 shibboleth |
[root@calaz /tmp] $ mount -t cifs //cobra3.int-evry.fr/procacci /mnt -o user=procacci Password: mount error 5 = Input/output error Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) |
[root@calaz /mnt] $ cat /mnt/smb/public/cgi/whoami.cgi #!/bin/bash echo "Content-Type: text/plain" echo "" date touch /mci/mci/procacci/public/cgi/touch_proc.txt echo "J'execute en tant que : `whoami`" echo "je suis reel : `id -r`" echo "je suis effectif : `id `" |
$ cat /mnt/smb/public/restricted/.htaccess <Limit GET POST> AuthType CAS AuthName "INT auth" deny from all Require valid-user satisfy any </Limit> |
$ cat /mnt/smb/public/shibboleth/.htaccess <Limit GET POST> AuthType shibboleth ShibRequireSession On ShibExportAssertion On require statut permanent </LIMIT> |
[jehan@calaz ~] $ rpm -q fuse-sshfs fuse-sshfs-1.7-1.fc5 |
[jehan@calaz ~] $ mkdir sshfs |
[jehan@calaz ~] $ /usr/bin/sshfs procacci@webspace.int-evry.fr:/mci/mci/procacci ./sshfs/ |
[jehan@calaz ~]
$ df
sshfs#procacci@webspace.int-evry.fr:/mci/mci/procacci
1048576000 0 1048576000 0% /home/jehan/sshfs
[jehan@calaz ~]
$ cd sshfs/public
[jehan@calaz ~/sshfs/public]
$ ls
index.html ....
|
[jehan@calaz ~/sshfs/public] $ cd ../.. [jehan@calaz ~] $ fusermount -u ./sshfs/ |
$ ssh procacci@webspace procacci@webspace's password: Last login: Thu Jan 12 16:56:23 2006 from calaz.int-evry.fr This account is restricted by rssh. Allowed commands: scp sftp If you believe this is in error, please contact your system administrator. Connection to webspace closed. |
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/jehan/.ssh/id_rsa): /home/jehan/.ssh/id_webspace_rsa Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/jehan/.ssh/id_webspace_rsa. Your public key has been saved in /home/jehan/.ssh/id_webspace_rsa.pub. The key fingerprint is: 47:e2:03:6d:86:fe:77:8b:3a:00:55:74:8f:e9:d0:4f jehan@calaz |
$ cat .ssh/id_webspace_rsa.pub >> .ssh/authorized_keys |
authorized_keys sur le serveur de publication. La clé publique doit se trouver dans un fichier portant exactement ce nom (authorized_keys) et étant dans le sous réptoire .ssh. C'est pourquoi nous commençons par créer l'arborescence et finirons par positioner les droits restrictifs d'acces à ces fichiers .$ sftp procacci@webspace.int-evry.fr Connecting to webspace.int-evry.fr... The authenticity of host 'webspace.int-evry.fr (157.159.10.74)' can't be established. RSA key fingerprint is 4c:34:e8:8f:a0:08:07:f8:e5:06:19:4a:7f:66:be:cf. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'webspace.int-evry.fr' (RSA) to the list of known hosts. procacci@webspace.int-evry.fr's password: sftp> mkdir .ssh sftp> put .ssh/authorized_keys .ssh/authorized_keys Uploading .ssh/authorized_keys to /mci/mci/procacci/.ssh/authorized_keys .ssh/authorized_keys 100% 393 0.4KB/s 00:00 sftp> chmod 700 .ssh Changing mode on /mci/mci/procacci/.ssh sftp> chmod 400 .ssh/authorized_keys Changing mode on /mci/mci/procacci/.ssh/authorized_keys |
$ scp -i ~/.ssh/id_webspace_rsa index.html procacci@webspace:~procacci/public_html/ Enter passphrase for key '/home/jehan/.ssh/id_webspace_rsa': index.html 100% 1707 1.7KB/s 00:00 |
http://www-public.int-evry.fr/~logincgi sous public ou cours. Ils s'exécuteront en tant que vous même ..htaccess dans le répertoire que où vous souhaitez controler l'acces.
Exemple de fichier .htaccesssous procacci\public_html\restricted :<Limit GET POST> AuthType CAS AuthName "INT auth" deny from all Require valid-user satisfy any </Limit> |
index.php ou index.html se trouvant dans ce répertoire protégé, ou tout autre nom de fichier si celui-ci est préciser dans l'URL .
Require user procacci doutrele mercey |
Ce document a été traduit de LATEX par HEVEA