HTML File Manager
On this page the HTML File Manager module is documented, and its features such as copying and pasting, creating files, and searching are explained. HTML File manager is included by default starting with webmin version 1.762. The HTML File Manager is called Filemin, and was created by Alexandr Bezenkov. The 'old' File Manager has been renamed to Java File Manager, and File Manager will now point to HTML File manager.
The HTML File Manager module
Under the Others category in Webmin is a module that is quite different from any of the others. Instead of configuring some server or service, it allows the user to view and manipulate files on the server through an HTML interface. This HTML File Manager replaces the old Java-based File Manager.
At the top you will see a row of buttons similar to a toolbar. Below that is a list of files and directories that are in the current directory.
When you first load the file manager, you will see the contents of the root directory on your system, or the user's home directory, depending on who you are logged in as. To enter another directory, just single-click on it in the list. To go back up a directory, click the left arrow at the top-left of the file manager.
The contents of any file on your system can be displayed and edited by clicking the Edit icon under the Actions column.
If you want to download a file from your Webmin system to the computer that your browser is running on, just click the file name.
To rename a file or directory, click the Rename icon under the Actions column.
Moving and Copying files
The HTML File Manager module allows you to rename, move and copy files. To select the file that you want to manipulate, just click the checkbox to the left of it.
To move files to a different directory, select one or more and click the Cut button on the toolbar. Then navigate to the destination and click the Paste button. If a file with the same name already exists, Webmin will prompt you to rename the pasted file to avoid the clash. If you choose not to rename, the file in the destination directory with the same name will be overwritten.
To copy files, select them in the right-hand pane and click the Copy button. Then go to the directory that you want them to be copied to, and click Paste. As when moving files, you will be prompted to rename any that clash with files that already existing in the destination directory. Multiple copies of a file can be made by pasting in different directories. To create a copy of a file in the same directory, just select it and hit Copy and Paste, and enter a new filename.
You can delete one or more files and directories by selecting them and clicking the Delete button on the toolbar. Before they are actually removed, a confirmation window listing all chosen files will be displayed. When the Delete button in the window is clicked, all chosen files, directories and their contents will be permanently deleted.
A single file can be renamed by selecting it in the right-hand pane and clicking the Rename button on the toolbar. This will bring up a window containing the current filename and a text box for entering a new name. If the new name is the same as an existing file in the same directory, it will be overwritten when the Rename button in the window is hit.
The HTML File Manager module offers two methods for creating new files - you can either create a text file from scratch, or upload data from the host that your web browser is running on. To create a new empty text file, click File then Create File. This will bring up a window in which you can enter the filename.
To upload a file from the PC your browser is running on, click File then Upload File on the toolbar. This will open a dialog window where you can choose the file to upload. When you are ready, click the Upload Files button to have the file(s) sent to your Webmin server. Once the upload is complete, the directory list will be updated to show the new file.
You can also retrieve a file from a remote URL. To do that, click File then Get from URL. There, you can enter the URL where your document is remotely hosted, as well as an optional username and password.
Editing file permissions
Each file or directory on a Unix file system is owned by a single user and group, and have a set of permissions that determines who can access it. Normally these are changed by the chown and chmod commands, but you can edit them in the file manager as well. To do this, select a file or files from the right-hand pane and click Tools then Chmod Selected or Chown Selected in the toolbar. This will bring up a permissions window.
In the Chmod window, you can select the appropriate read, write, and execute permission for the file(s).
In the Chown window, you can select the user and group you want as the owner for that file or directory.
If you want, you can tell it to apply the permissions recursively if you have selected a directory. Just be careful when using that option not to apply the permissions to files you didn't mean to give them to!
The file manager can be used to search for files or directories on your system that match certain criteria. This can be useful if you know the name of a file but not the directory it is located in. To search for files, click on Tools in the toolbar, then click 'Search' to bring up the search window. In the Search query field, enter a search pattern to look for. This can be something like *.txt or foo?.c.
It is possible to bookmark folders, so that future access to that folder can be done quickly.
To bookmark a folder, use the HTML File Manager to browse to that folder, then click Bookmarks then Bookmark Current Folder in the toolbar.
To access the bookmarks later, click Bookmarks, and you will see the bookmarks you created at the bottom of the menu.