File Manager

Webmin's File Manager

On this page the File Manager module is documented, and its features such as copying and pasting and file sharing are explained.

The 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 a Java applet file manager. The user interface is similar to the old Windows explorer - on the left is a tree of directories, and on the right is a list of files in the current directory. At the top is a row of buttons on a toolbar that are used for carrying out various operations on selected files. This screenshot shows an example :

filemanager
The File Manager module.

Unlike other modules, this one only has a single page which is taken up entirely with the Java applet. To return to Webmin's main menu, you have to click on the Index arrow in the top-left corner. Naturally, if your browser does not support Java then the applet cannot be used.

The File Manager module's user interface is almost exactly the same on all versions of Unix. The only differences are that some of the EXT, ACL and Attr buttons (described in the*Editing attributed and ACLs* section) may not exist on some operating systems. This is because the filesystems on those Unix variants do not support the extended attributes that the buttons allow you to configure.

Navigating directories and viewing files

When you first load the file manager, the right-hand pane will display the contents of the root directory on your system. To enter another directory, just double-click on it in the list. To go back up a directory, double-click the .. link at the top the current directory's listing.
You can also view the contents of a directory by clicking on it in the tree in the left-hand pane. Double-clicking will open the directory in the tree, causing any subdirectories under it to appear. Double-clicking again will close it. Whenever you enter a directory using the right-hand pane, it will be opened in the tree on the left as well. Similarly, when the .. link is double-clicked to go back to the parent, the old directory will be closed in the tree.
It is also possible to jump to any directory on your system by entering its path into the text field above the right-hand directory listing. Assuming that it actually exists, Webmin will open all parent directories in the tree and displays its contents in the list on the right.
To speed up the user interface, the file manager caches the contents of all directories that you view using it. This means that if a file is created, modified or deleted on the server, it will not be reflected in the directory listing until you click the Refresh button on the toolbar.
The contents of any file on your system can be displayed by double-clicking on it in the list in the right-hand pane. A separate browser window will be opened, and the contents of the file displayed within by your browser. Thus, any file type that the browser supports can be viewed using the file manager.
If you want to download a file from your Webmin system to the host that your browser is running on, hold down shift while double-clicking on it instead. The browser should prompt you to save the file instead of opening a window to display its contents. You can also force a download by selecting a file from the right-hand pane and clicking the Save button on the toolbar at the top of the file manager window.

Manipulating files

The File Manager module allows you to rename, move and copy files in the just the same way that any other file manager would. To select the file that you want to manipulate, just click on it in the right-hand pane. To select multiple files, hold down the control key while clicking, or hold down shift to select an entire range.
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.

Creating and editing files

The 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 on the New document button on the toolbar to the right of the Delete button. This will bring up a window in which you can enter the full path to the file and its contents. When you are done editing, click the Save button at the bottom of the file creation window.
To upload a file from the PC your browser is running on, click the Upload button on the toolbar. This will open a small browser window with two fields. The File to upload field is for selecting a file on your PC, while the Upload to directory field is for entering the directory that the file will be uploaded to. When both fields have been filled in, click the Upload button to have the file sent to your Webmin server. Once the upload is complete, the directory list will be updated to show the new file.
Because many people run their web browsers on the Windows operating system which uses a different text file format to Unix, there is an option in the upload window to convert the uploaded file to the correct format. This Convert DOS newlines? Field should only be set to when uploading Yes a text file from a Windows system. Enabling it when uploading binary files will cause them to be corrupted.
The file manager can also be used to edit existing text files on your system. To do this, select a file in the right-hand pane and click the Edit button on the toolbar. A window showing its current contents will be displayed, allowing you to edit the file as you wish. When done, click the Save button to have it written back to the server. Do not attempt to edit and save non-text files, as their contents will be corrupted.
Any existing file can be renamed simply by selecting it in the right-hand pane and clicking the Rename button on the toolbar. This will bring up a window displaying the current filename and prompting for a new one. Click the Rename button in the window after entering a new name to have it changed.

Editing file permissions

Each file or directory on a Unix filesystems 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 single file from the right-hand pane and click the Info button on the toolbar. This will bring up the permissions window shown below:

fileinfo
The file permissions window

The File section of the window displays its full path, size, type and last modification date. The Permissions section contains checkboxes that control which users can read, write and execute the file. These are the same permissions that you can change at the command line with the chmod command. As they are selected and de-selected, the octal permissions that would normally be used with chmod are shown in the Octal field below.

To change the file's owners, enter new user and group names or IDs into the User and Group fields in the Ownership section of the window. For executables, you can also control which user the program runs as using the Execute as user and *Execute as group* fields. Because these options correspond to chmod permissions, changing them will update to Octal field as well.
When editing a directory, the checkboxes available are slightly different. The execute permission is replaced with list, an Only owners can edit files box is added, and the Execute as checkboxes are replaced with Files inherit group. These all correspond to standard Unix file permissions that any system administrator should already be familiar with.
If changing the permissions and ownership of a directory, you can also choose to change those of any subdirectories and files that it contains. The Apply changes to menu determines which files and directories the permissions are applied to, and has three options
  • This directory only The ownership and permissions chosen will be set on the selected directory only.
  • This directory and its files The ownership and permissions will be set on the chosen directory and all files that it contains. Subdirectories and their files will not be effected.
  • This directory and all subdirectories Ownership and permissions will be set on the chosen directory and all files and subdirectories that it contains.
If the file that was selected when the Info button was clicked is actually a symbolic link, the window will contain an additional Link to field that can be changed if you want to edit the link destination. Changing the permission and ownership fields is pointless, as they cannot be edited for symbolic links on Unix systems.

Creating links and directories

The file manager can be used to create a new symbolic link in the current directory by following these simple steps :
  1. Navigate to the directory that you want the link to be created in, and click the New link button on the toolbar.
  2. In the window that appears, enter the path of the new link file in the Link from field.
  3. Enter the path to an existing file or directory that you want the link to point to into the Link to field.
  4. Click the Create button to have it created on the server and added to the directory listing.
New directories can also be created using these steps :
  1. Navigate to the directory that you want the new sub-directory to be under, and click the New directory button on the toolbar.
  2. Enter the full path to the directory into the New directory field.
  3. Hit the Create button to have it created.

Finding files

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, or if you want to find files larger than some size. To search for files, the steps to follow are :
  1. Click on the Find icon on the toolbar, which will bring up a search window.
  2. In the Search directory field, enter the directory that the files you are looking for are under. To search the entire system, just enter /. However, this may take a long time on a server with large filesystems.
  3. To search by filename, enter a pattern into the For files matching field. This can be something like *.txt or foo?.c. If the field is left blank, filenames will not be included in the search criteria.
  4. To find only files owned by a particular user, enter the username or ID into the Owned by user field.
  5. Similar, to find files owned by group, enter its name or ID into the Owned by group field.
  6. To limit the search to normal files, directories or some other type of file, select it from the File type field.
  7. If you want to find files larger than some size, change the File size field to More than and enter the minimum size in bytes into the adjacent field. To find those smaller than some size, select Less than and enter the maximum size into the field next to it.
  8. To prevent filesystems mounted under the search directory from being checked, change the Search past mounts option to No. This can be useful if you want to avoid searching NFS filesystems, which can be much slower than those mounted from local disks.
  9. Finally, click the Search Now button. When the search is complete, all files and directories that match all of the chosen criteria will be displayed under the Search results tab in the window. You can double-click on one to have the file manager automatically navigate to the directory that contains it, and select it in the right-hand pane. To do another search, click back on the Search criteria tab and follow the steps above again.
 

Full Compatibility

iziHost Europe! servers are designed with accessibility and compatibility in mind to best serve your site's audience.
  • CentOS v5
  • PHP v5
  • MySQL v5 and Postgresql
  • Apache v2
  • Webmin
  • Virtualmin Pro

Who's Online

We have 2 guests online
Order Standard plan

Key Features

image65 scripts to choose from
eCommerce, forums, CMS, Helpdesk, etc.
imageIntuitive Control Panel
Instead of telling you how great it is, try it out yourself at the demo.
imagePro FTP and Filemanager
Upload and download anything you want in any way

SmartDC Data Center

datacenteriziHost Europe! has placed the servers in a i3d suite at the SmartDC. The DC has over 12 megawatt available on the 23 kV power network. Learn more...

i3d Suites

switchThe coreswitches are a HP Procurve 5304xl-32g switch and a HP Procurve 4200vl-48g switch. All racks are supplied with redundant gigabit uplinks. Learn more...
izihost.eu Guarantee
affordable web hosting
Write izihost.eu Review
web site hosting
izihost.eu Uptime
web site hosting