issue175:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue175:tutoriel1 [2021/11/30 18:54] – d52fr | issue175:tutoriel1 [2021/12/03 14:53] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | |||
+ | Bab : // attention aux// **≤nowiki> | ||
+ | |||
+ | |||
**The Web Distributed Authoring and Versioning – styled as WebDAV in a curious combination of capitals – has come up several times in articles here on FullCircle Magazine. It can be seen as a fair example of the type of technology some of us old-timers like: simple, easy to work with, fast, and gets the job done with minimal stress. Let us go right on and say upfront that security is not a priority in this use-case. If you need security, you will lose convenience – and convenience is what today’s piece is all about. | **The Web Distributed Authoring and Versioning – styled as WebDAV in a curious combination of capitals – has come up several times in articles here on FullCircle Magazine. It can be seen as a fair example of the type of technology some of us old-timers like: simple, easy to work with, fast, and gets the job done with minimal stress. Let us go right on and say upfront that security is not a priority in this use-case. If you need security, you will lose convenience – and convenience is what today’s piece is all about. | ||
In its essence, WebDAV can be defined as using a simple web server and its associated HTTP protocol to share files across a network. Sharing files is an obvious necessity for most homes today, while doing so using web-based services over the Internet seems a tad overkill just to get a bit of data from one room to the next. Also, WebDAV has quite a bit of support from many desktop applications in the Ubuntu ecosystem, which is something I will get into a bit later, after actually setting up the server. For the time being, let us just state that our goals will be simple file sharing at user level, as in accessing files from any device on the network, editing text files on a shared volume, or making quick backups of data we need to share between computers.** | In its essence, WebDAV can be defined as using a simple web server and its associated HTTP protocol to share files across a network. Sharing files is an obvious necessity for most homes today, while doing so using web-based services over the Internet seems a tad overkill just to get a bit of data from one room to the next. Also, WebDAV has quite a bit of support from many desktop applications in the Ubuntu ecosystem, which is something I will get into a bit later, after actually setting up the server. For the time being, let us just state that our goals will be simple file sharing at user level, as in accessing files from any device on the network, editing text files on a shared volume, or making quick backups of data we need to share between computers.** | ||
+ | |||
+ | Le Web Distributed Authoring and Versioning - appelé WebDAV dans une curieuse combinaison de majuscules - évoqué à plusieurs reprises dans des articles du magazine FullCircle. Il peut être considéré comme un bon exemple du type de technologie que certains d' | ||
+ | |||
+ | Essentiellement, | ||
+ | |||
**The following community tutorial at https:// | **The following community tutorial at https:// | ||
Ligne 11: | Ligne 20: | ||
sudo apt install apache2 | sudo apt install apache2 | ||
- | At this point, you can check your web server is already working by pointing a browser to the address http:// | + | < |
+ | Le tutoriel communautaire suivant, à l' | ||
- | **For our purposes, we will leave this default web page be. If you are interested, the files are in the directory / | + | Commencez par installer le serveur Apache, s'il n'est pas déjà sur votre système. Par exemple : |
+ | |||
+ | sudo apt update | ||
+ | |||
+ | sudo apt install apache2 | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | **< | ||
sudo mkdir / | sudo mkdir / | ||
Ligne 25: | Ligne 44: | ||
< | < | ||
DAV On | DAV On | ||
- | </ | + | </ |
+ | </nowiki>** | ||
- | **You will need to do this as administrator, | + | < |
+ | |||
+ | sudo mkdir / | ||
+ | |||
+ | sudo chown www-data: | ||
+ | |||
+ | Maintenant, éditez le fichier de configuration Apache / | ||
+ | |||
+ | Alias /webdav / | ||
+ | < | ||
+ | DAV On | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | **< | ||
+ | You will need to do this as administrator, | ||
sudo editor / | sudo editor / | ||
Ligne 37: | Ligne 72: | ||
Now, what about adding files from a file manager? | Now, what about adding files from a file manager? | ||
- | I tried this out using Ubuntu 21.04’s Gnome nautilus file manager. We will need to know the key combination to type in an address: < | + | I tried this out using Ubuntu 21.04’s Gnome nautilus file manager. We will need to know the key combination to type in an address: < |
+ | </ | ||
+ | |||
+ | < | ||
+ | Vous devrez faire cela en tant qu' | ||
+ | |||
+ | sudo editor / | ||
+ | |||
+ | C'est à peu près tout. Si nous redémarrons notre serveur Apache, nous pouvons maintenant parcourir notre nouveau partage WebDAV dans un navigateur Web, en utilisant soit l' | ||
+ | |||
+ | Cependant, un navigateur Web tel que Firefox ou Chrome ne peut que lire les données de notre partage, et ni écrire ni modifier les fichiers. Cela est déjà utile, notamment pour partager des fichiers de notre ordinateur vers n' | ||
+ | |||
+ | Maintenant, qu'en est-il de l' | ||
+ | |||
+ | J'ai essayé ceci en utilisant le gestionnaire de fichiers nautilus de Gnome d' | ||
+ | </ | ||
**Yours will probably be empty to begin with; to populate it just add files by dragging them from any other folder. In many ways, this is a lot like using a USB stick to store files. You can erase files (please be careful, they really are wiped out with no warning!), rename files, create directories and subdirectories, | **Yours will probably be empty to begin with; to populate it just add files by dragging them from any other folder. In many ways, this is a lot like using a USB stick to store files. You can erase files (please be careful, they really are wiped out with no warning!), rename files, create directories and subdirectories, | ||
Ligne 44: | Ligne 95: | ||
As you can see, I used this very same setup to prepare the article, so you could say I eat my own dog food. What did come out useful was the possibility of editing files directly from the WebDAV share, both on the server itself and from another computer on the local network. Many programs in Ubuntu and its derivatives are aware of these shares, and can use them. For instance, I was able to open a file directly from the WebDAV share using LibreOffice’s standard Open dialog, and save it back both using the Save and Save as dialogs.** | As you can see, I used this very same setup to prepare the article, so you could say I eat my own dog food. What did come out useful was the possibility of editing files directly from the WebDAV share, both on the server itself and from another computer on the local network. Many programs in Ubuntu and its derivatives are aware of these shares, and can use them. For instance, I was able to open a file directly from the WebDAV share using LibreOffice’s standard Open dialog, and save it back both using the Save and Save as dialogs.** | ||
+ | |||
+ | Le vôtre sera probablement vide au départ ; pour le remplir, il suffit d' | ||
+ | |||
+ | Si vous utilisez régulièrement ce partage WebDAV, il peut être judicieux de le marquer d'un signet dans le navigateur de fichiers, en utilisant un clic droit de la souris. | ||
+ | |||
+ | Comme vous pouvez le constater, j'ai utilisé cette configuration pour préparer cet article, on peut donc dire que j' | ||
+ | |||
**When LibreOffice is editing a remote file, this is indicated in the window title bar. Since remote editing a file is not completely safe, it is always best to have a backup copy just in case. I did suffer an unforeseen electrical problem during which the desktop that serves as a server did not have a UPS and went down. When the lights came back on, the computer just powered back up, and the battery-powered laptop on which I had been doing the actual editing on was able to use LibreOffice’s default recuperation mechanism to restore the file to the point when power had been cut off at, and carry on. So, it must be said that the DAV system is sufficiently robust that it may very well be used for remote edition in many cases. Just make regular copies with different file names from time to time if editing a long document, especially if your local network has its glitches. | **When LibreOffice is editing a remote file, this is indicated in the window title bar. Since remote editing a file is not completely safe, it is always best to have a backup copy just in case. I did suffer an unforeseen electrical problem during which the desktop that serves as a server did not have a UPS and went down. When the lights came back on, the computer just powered back up, and the battery-powered laptop on which I had been doing the actual editing on was able to use LibreOffice’s default recuperation mechanism to restore the file to the point when power had been cut off at, and carry on. So, it must be said that the DAV system is sufficiently robust that it may very well be used for remote edition in many cases. Just make regular copies with different file names from time to time if editing a long document, especially if your local network has its glitches. | ||
Ligne 50: | Ligne 108: | ||
I also edited the screen captures by invoking Gimp from the WebDAV share with the right mouse click, with no problems to report.** | I also edited the screen captures by invoking Gimp from the WebDAV share with the right mouse click, with no problems to report.** | ||
+ | |||
+ | Lorsque LibreOffice est en train de modifier un fichier distant, c'est indiqué dans la barre de titre de la fenêtre. L' | ||
+ | |||
+ | Le fait d' | ||
+ | |||
+ | J'ai également modifié les captures d' | ||
+ | |||
**Now, there are some caveats we need to talk about. In the first place, seasoned users or administrators are probably yelling at their screens about not having any security at all in place. They are quite right about that. At the very minimum, setting up a password protection for your WebDAV share is a good idea. The tutorial referenced above has the instructions to do so. Additionally, | **Now, there are some caveats we need to talk about. In the first place, seasoned users or administrators are probably yelling at their screens about not having any security at all in place. They are quite right about that. At the very minimum, setting up a password protection for your WebDAV share is a good idea. The tutorial referenced above has the instructions to do so. Additionally, | ||
Now, whether just a simple password-based scheme is sufficient security for your uses, or even if it is at all necessary, is up to you. Personally, if I have a file containing sensitive data, I will probably be encrypting that file using any of the tools available on a Linux system, even when it is in situ on my hard drive. Just a hint: a password can be used when creating a ZIP file, and many other compressed file formats for that matter. Linux Mint’s nemo file application has the option: just right-click on the file to compress, and is it down there among the “Other Options”. Unfortunately, | Now, whether just a simple password-based scheme is sufficient security for your uses, or even if it is at all necessary, is up to you. Personally, if I have a file containing sensitive data, I will probably be encrypting that file using any of the tools available on a Linux system, even when it is in situ on my hard drive. Just a hint: a password can be used when creating a ZIP file, and many other compressed file formats for that matter. Linux Mint’s nemo file application has the option: just right-click on the file to compress, and is it down there among the “Other Options”. Unfortunately, | ||
+ | |||
+ | Il y a toutefois quelques mises en garde à formuler. Tout d' | ||
+ | |||
+ | Maintenant, c'est à vous de voir si un simple système basé sur un mot de passe est une sécurité suffisante pour vos usages, ou même si c'est nécessaire. Personnellement, | ||
+ | |||
**A second point is that concurrent access by two users to the same file in the WebDAV shared folder is not a good idea. This file sharing system is not safe in that sense. So, if two or more people are accessing the same file, and modifying or writing to it, set up a system to make sure you do not overwrite each other’s work accidentally. Using different filenames is an easy solution. | **A second point is that concurrent access by two users to the same file in the WebDAV shared folder is not a good idea. This file sharing system is not safe in that sense. So, if two or more people are accessing the same file, and modifying or writing to it, set up a system to make sure you do not overwrite each other’s work accidentally. Using different filenames is an easy solution. | ||
Finally, please remember a WebDAV is not, in itself, a backup solution. It may become one only if you have a second copy of each file on another computer and hard drive, e.g. one on the DAV share on a desktop, and a second in a local directory on a laptop. As usual, if you have less than three distinct copies of each file, you run the risk of losing a disk and some of your data. But WebDAV does make it easier for the end user to make copies of files on another computer. So, even though I do stress WebDAV is not a backup in itself, it may have a role to play in making backups easier on the user, and so more likely to happen in real life. Perhaps, this is a point to consider carefully.** | Finally, please remember a WebDAV is not, in itself, a backup solution. It may become one only if you have a second copy of each file on another computer and hard drive, e.g. one on the DAV share on a desktop, and a second in a local directory on a laptop. As usual, if you have less than three distinct copies of each file, you run the risk of losing a disk and some of your data. But WebDAV does make it easier for the end user to make copies of files on another computer. So, even though I do stress WebDAV is not a backup in itself, it may have a role to play in making backups easier on the user, and so more likely to happen in real life. Perhaps, this is a point to consider carefully.** | ||
+ | |||
+ | Un deuxième point est que l' | ||
+ | |||
+ | Enfin, n' | ||
+ | |||
**Finally, to sum up, let us have a bit of a gallery of devices accessing a WebDAV share. This first one is using KDE Plasma’s dolphin file manager. In this case, for some reason we need to use the address webdav://< | **Finally, to sum up, let us have a bit of a gallery of devices accessing a WebDAV share. This first one is using KDE Plasma’s dolphin file manager. In this case, for some reason we need to use the address webdav://< | ||
Ligne 64: | Ligne 139: | ||
Just as in Gnome, Cinnamon or KDE, once the shared directory is bookmarked in the finder in Mac OS, applications can access it directly – which facilitates opening or saving files. I find this consistency between Linux and Apple desktop behaviors rather pleasing. It can also be quite practical to do some work on a file in one system, then continue on another computer with different characteristics and software, if needed. This trick can also come in handy in households with a varied set of computers and users.** | Just as in Gnome, Cinnamon or KDE, once the shared directory is bookmarked in the finder in Mac OS, applications can access it directly – which facilitates opening or saving files. I find this consistency between Linux and Apple desktop behaviors rather pleasing. It can also be quite practical to do some work on a file in one system, then continue on another computer with different characteristics and software, if needed. This trick can also come in handy in households with a varied set of computers and users.** | ||
- | + | ||
+ | Enfin, pour résumer, voyons un peu une galerie de dispositifs accédant à un partage WebDAV. Ce premier exemple utilise le gestionnaire de fichiers dolphin de KDE Plasma. Dans ce cas, pour une raison quelconque, nous devons utiliser l' | ||
+ | |||
+ | Nous pouvons également changer complètement de plate-forme et utiliser le Mac OS d' | ||
+ | |||
+ | Tout comme dans Gnome, Cinnamon ou KDE, une fois que le répertoire partagé est mis en signet dans le finder sous Mac OS, les applications peuvent y accéder directement - ce qui facilite l' | ||
+ | |||
**As for handheld devices such as phones or tablets, as stated, read access to the share is easy from within the web browser. We can download files from the share to the device, which covers the activities most of us do, such as reading PDF files or watching videos on the device. | **As for handheld devices such as phones or tablets, as stated, read access to the share is easy from within the web browser. We can download files from the share to the device, which covers the activities most of us do, such as reading PDF files or watching videos on the device. | ||
Ligne 70: | Ligne 152: | ||
There is some official guidance in this article from Apple Support: https:// | There is some official guidance in this article from Apple Support: https:// | ||
+ | |||
+ | Quant aux appareils portables tels que les téléphones ou les tablettes, comme indiqué, l' | ||
+ | |||
+ | Les choses peuvent devenir un peu plus compliquées si nous voulons transférer des données dans le sens inverse. L' | ||
+ | |||
+ | Vous trouverez des conseils officiels dans cet article du support Apple : https:// | ||
+ | |||
**So, to be clear going forward, just what can and cannot WebDAV do for us? What it can do is provide a simple and easy to set up a file share on our local network. This can be very convenient as a temporary storage to share files between computers, or between users, even working with different operating systems. Users can open and edit files directly from the shared directory. WebDAV can also make files available to mobile devices without needing to upload to and download from the Internet. What would be more complex to set up is true security, though this may not be an issue on a home network that is correctly firewalled off from the Internet… and to which the neighbors do not have WiFi access. | **So, to be clear going forward, just what can and cannot WebDAV do for us? What it can do is provide a simple and easy to set up a file share on our local network. This can be very convenient as a temporary storage to share files between computers, or between users, even working with different operating systems. Users can open and edit files directly from the shared directory. WebDAV can also make files available to mobile devices without needing to upload to and download from the Internet. What would be more complex to set up is true security, though this may not be an issue on a home network that is correctly firewalled off from the Internet… and to which the neighbors do not have WiFi access. | ||
Ligne 76: | Ligne 165: | ||
In a future article, I will be further exploring the applications of this technology to share calendars (CalDAV) or contact information (CardDAV). ** | In a future article, I will be further exploring the applications of this technology to share calendars (CalDAV) or contact information (CardDAV). ** | ||
+ | |||
+ | Donc, pour être clair, que peut et ne peut pas faire WebDAV pour nous ? Ce qu'il peut faire, c'est fournir un partage de fichiers simple et facile à mettre en place sur notre réseau local. Cela peut être très pratique comme stockage temporaire pour partager des fichiers entre ordinateurs, | ||
+ | |||
+ | Ce qu'il ne peut pas bien faire, c'est remplacer les services entièrement basés sur le web, notamment ceux qui nous permettent d' | ||
+ | |||
+ | Dans un prochain article, j' | ||
issue175/tutoriel1.1638294886.txt.gz · Dernière modification : 2021/11/30 18:54 de d52fr