Knowledgebase


Use Code KBALL501M

50% OFF First Month!

on selected monthly services


Webmin Control Panel (eApps) - Using the File Manager
Posted by Cinu Varghese on 24 September 2010 10:55 AM

Applicable Plans - eApps Cloud Hosting Plans (eApps templates only)

User Guide - Using the File Manager

Overview

The File Manager in the Control Panel allows you to edit, create, and manipulate files and directories on your system. All options that are available through the command line are also available through the File Manager.

To access the File Manager, you will need to log in to the Control Panel. See the User Guide - Using the Control Panel http://support.eapps.com/control_panel_eapps/control_panel for more information if necessary.

NOTE - the File Manager is a Java applet, meaning your browser must support Java for the File Manager to work. For various reasons, some versions of some browsers do not work with the File Manager. If this is the case, please try a different browser, or make sure your browser is on the latest update. This is not an eApps issue, but a browser/java issue. eApps has no way to resolve this problem.

Navigating the File Manager
File Manager main screen

Manipulating Files and Directories (Copy, Paste, Cut, Delete, Rename)
Copy, Cut, and Paste
Delete and Rename

Creating and Editing Files
Creating Files Editing Files

Creating Directories and Symbolic Links
Creating Directories
Creating Symbolic Links

File and Directory Permissions
File Permissions
Directory Permissions

Finding Files and Directories


To access the File Manager, click on the File Manager icon in the main System screen File Manager icon

Depending on your browser, it make take some seconds for the Java applet to display. If your browser locks up at this point, you will need to close it and try a different browser, or update your browser and possibly your version of Java.

File Manager main screen

The File Manager is divided into three sections - a button bar at the top for all the various functions, a left pane that shows the directory tree, and a right pane that shows the directories and files in the selected directory in the left pane. There is also a text area above the right pane where you can enter the absolute path name of a file to search for it.

File Manager Main Screen

To move around the File Manager, click on a directory in the left pane, and then use the right pane to navigate to any files and directories in that directory.

To exit the File Manager and return to the main System screen, click on the Index button Index button

To change any of the configuration options for the File Manager module, click on the Config button Config button

Please take a few minutes to become familiar with how to navigate the File Manager so that you will be able to find files and directories easily.


Manipulating Files and Directories (Copy, Paste, Cut, Delete, Rename)

The File Manager allows you to do standard file and directory manipulations, such as copy, paste, cut, delete and rename. All of these actions are available on the button bar.

Warning - by default, the File Manager is accessed with root user privileges. This means that you can easily overwrite and delete critical system files, rendering your system useless. Please be careful and make sure you know exactly what files you are working with, and the consequences of moving or deleting them.

Copy, Cut, and Paste

Copy

To copy a file or directory, click on the item you wish to copy in the right pane, and then click on the Copy button Copy button

You can copy multiple items by holding down the Control key, and selecting the items with the mouse. Then click on Copy to copy all those items.

Cut

To cut a file or directory, click on the item you wish to cut in the right pane, and then click on the Cut button Cut button

As with Copy, you can cut multiple items by holding down the Control key and selecting the items with the mouse, and then clicking on Cut to cut those items.

Paste

To paste a copied or cut item, navigate to where you want the item to be copied to, and click on Paste Paste button

If there are already files or directories with the same names as the items you are trying to paste, you will be given a chance to rename the file being pasted to avoid a conflict. If you choose not to rename the file, then the existing file will be overwritten by the file being pasted.

You can also paste the items into multiple locations by navigating to the new location, and then clicking on Paste again.

Delete and Rename

Delete

To delete a file or directory, click on that item in the right pane of the File Manager, and then click on the Delete button Delete button

You will be prompted to confirm that you wish to delete these items. Remember that the File Manager will allow you to delete any file or directory, even if it is a critical system file. Make sure that you know exactly what you are deleting.

You can delete multiple files or directories by holding down the Control key and selecting the items with the mouse. Then click on Delete to delete those items.

Rename

To rename a file or directory, click on that item in the right pane of the File Manager, and then click on the Rename button Rename button

You will be prompted for the new name of the file or directory. If you choose the same name as an existing file or directory, you will not be allowed to use that name.

You can only rename one file or directory at a time - there is not a way to rename multiple files using the Control Panel.

The File Manager will allow you to rename any file or directory on the system, even if that item is needed by other applications. Be very careful when renaming any files.


Creating and Editing Files

Using the File Manager, you can create new files on the system, and also edit any text file. You can also upload files from your local computer to the system. (Creating directories will be covered in the Creating Directories section.)

Creating Files

There are two ways to create a new file on the system. You can create a text file directly on the system, or upload an existing file from your local computer to the system.

Create a new file

To create a new file on the system using the File Manager, click on the New button to the right of the Delete button New File button

This opens a new window, where you can enter the absolute path to the location of the file you wish to create. You can also enter the text of the file.

Creating file

There are several options at the bottom of the Creating file screen:

Creating file options

  • Windows newlines - this sets the newline/carriage return character to use Windows newlines, which are CR+LF (carriage return + line feed). Since the this is a Linux system, leave this box unchecked to use the Linux newline of LF (line feed).

  • Goto - this lets you go to a specific line number in the file

  • Find - allows you to do a Find and Replace in the file

  • Save - allows you to save your current work without closing the file

  • Save and Close - saves the file and closes the Creating file window

  • Close - closes the file without saving any changes

Uploading a file

To upload a file from your local computer to the system, click on the Upload button Upload button

NOTE - you may have to enable pop up windows in your browser for the Upload button to function correctly.

Upload File

  • File to upload - click on Choose File browse for the file on your local computer

  • Upload to directory - enter the absolute path to the directory on the system where the file will be uploaded to

  • Convert Windows newlines? - set this to Yes when uploading a file from a Windows system. This will convert the newlines in the file to Linux newlines. If you are uploading a binary file of any type, leave this set to No.

  • Uncompress ZIP or TAR file? - set to Yes to have a file that is compressed with ZIP or TAR automatically uncompressed in the directory you have chosen to upload the file to. Set to Yes, then delete to have the compressed file deleted after it has been uncompressed, leaving only the uncompressed file. Select No to just have the file uploaded with no action taken.

  • Upload as user - enter the name of the user to upload the file, or browse for a user from the /etc/passwd file. Make sure that whatever user you select has at least write permissions to the directory you are trying to upload the file to, otherwise the upload will fail.

Once you have made all the selections, click on Upload to upload the file. Depending on the size of the file, it will take several seconds to several minutes (or longer) to upload the file to the directory you have chosen.

Editing Files

Any text file on the system can be edited using the File Manager.

To edit a file, navigate to the file in the right pane of the File Manager, and click on the file name to select it. Then click on the Edit button Edit button

WARNING - do not try to edit a non-text file, such as a binary file, using the Edit function. You will corrupt the file and damage the application or system it belongs to.

Edit file

In the Editing window you can edit the file. Remember that this is a plain text editor, so there is no character formatting available (no bold or italic, for example). Only plain ASCII text is allowed.

The same options that were available in the Creating file window are available here:

Creating file options

  • Windows newlines - this sets the newline/carriage return character to use Windows newlines, which are CR+LF (carriage return + line feed). Since the system is a Linux system, leave this box unchecked to use the Linux newline of LF (line feed).

  • Goto - this lets you go to a specific line number in the file

  • Find - allows you to do a Find and Replace in the file

  • Save - allows you to save your current work without closing the file

  • Save and Close - saves the file and closes the Editing window

  • Close - closes the file without saving any changes


Creating Directories

To create a new directory (usually a subdirectory of an existing directory), navigate to the parent directory for the new directory in the left pane of the File Manager, and click on it so that the contents of the parent directory are shown in the right pane.

Click on the New Directory button New Directory button

This opens the New Directory window, where you have the absolute path of the parent directory displayed. Enter the name of the new directory (test_directory in this example), and click Create to create the new directory, or Cancel to cancel.

New Directory

This will create the new directory, but that directory will have an owner and group of root. See the section on Directory Permissions for information on how to change the owner and group of the directory.

To create a symbolic link, navigate to the directory you wish to create the symbolic link for. If you are creating a symbolic link for a file, navigate to the location of that file.

Click on the New Link button Symbolic link button

Create Link

  • Link from: - enter the absolute path to the new file to be linked from (this is usually a file that does not exist)
  • Link to: - enter the absolute path to the existing file that the link will point to

Click on Create to create the symbolic link, or Cancel to cancel.


File and Directory Permissions

Using the File Manager, you can set or change the permissions, user and group on any file or directory on the system. In addition, you can also get the size of a directory, and specify how any changes to the parent directory affect subdirectories and files in that directory.

To change these attributes, navigate and select a file or directory, and click on the Info button Info button

File Permissions

To view or change the permissions, owner, and group for a file, navigate to that file in the File Manager, and click on the Info button.

File Permissions

The File Permissions screen is divided into three sections: File, Permissions, and Ownership.

  • File - this shows the Path to the file, the Type, the Size in bytes, and the last Modified time. None of this information can be edited or changed from this screen.

  • Permissions - this shows the existing permissions for the file, and their corresponding octal value. By default, a file is created with 644 permissions, meaning the User (owner) can read and write to the file, and all others (Group and Other) can only read the file. A common modification is to allow Group access to Write the file, especially for files where the file User (owner) is part of a secondary group, such as apache. This would be 664 octal.

    Be careful with changing permissions on files, because having the permissions too open (where all users and groups can modify the file) can open your system to hackers. When in doubt, leave file permissions alone.

    Wikipedia has an explanation of UNIX/Linux file permissions, and there are many other sources online that explain how these permissions work - http://en.wikipedia.org/wiki/Filesystem_permissions

  • Ownership - this shows the file User (owner) and Group. If the file has an incorrect owner and group, you can change this here. Unless you know exactly what you are doing and why, leave the Setuid and Setgid settings as is.

Click Save to save your changes, or Cancel to cancel your changes and return to the main File Manage screen.

Directory Permissions

To view or change the permissions and ownership for a directory, and to see the size of the directory, navigate to the directory in the File Manager (the directory must be in the right pane) and click on the Info button.

Directory Permissions

The Directory Permissions screen is divided into five sections: File, Permissions, Ownership, Directory Size, and Apply changes to.

  • File - this shows the Path to the directory, the Type, the Size in bytes, and the last time the directory was Modified. None of this information can be modified from this screen.

  • Permissions - this shows the existing permissions for the directory, and the corresponding Octal value. Directories are usually created with 755 permissions, meaning the User (owner) can read, write and list (execute) the directory, and Group and Other can Read and List. A common modification is to change the directory to 775 octal, meaning that the Group also has Write permissions. This is done when the directory User (owner) is also part of a secondary group, such as apache, that need to be able to access the files in the directory.

    As with files, be careful about changing permissions on directories to be too open. Some applications require that directories have a very specific set of permissions before they will work. Please read any documentation that came with any applications you install to see if this is the case.

  • Ownership - this shows the directory User (owner) and Group. If you check the box for Setgid: Files inherit group, then all files created in the directory will have the same Group as the directory itself, instead of the group ID of the user that created the files.

  • Directory size - to see the size of the directory, click on the Get Size button Get Size

    • Total bytes - the size of the directory
    • Total files - the number of files in the directory, including all files in any subdirectories
    • Total directories - the number of subdirectories in the parent directory
  • Apply changes to - this allows you to apply any changes you have made, such as changes to permission or ownership. Select the item from the drop down list that you wish to use.

    • This directory only - this applies any changes you have made only to the parent directory. Files and subdirectories are not affected.
    • This directory and its files - this applies any changes you have made to the parent directory, and any files inside the directory. Any subdirectories and their files are not affected.
    • This directory and all subdirectories - this will apply any changes to all subdirectories and all files.

Finding Files and Directories

The File Manager can be used to find files and directories on the system. The search can be filtered by size, user, and type of file.

To search for a file or directory, click on the Find button Find button

Find files

There are two tabs: Search criteria and Search results

Search criteria - enter the search parameters here

  • Search directory - enter the absolute path of the directory to be searched. To search the entire system, enter a “/” (minus the quote marks)

  • For files matching - if you know the name of the file, or part of the name, enter it here. You can also enter strings like *.txt or foo.*. If this field is left blank, no filenames will be searched for.

  • Containing text - this will search for a text string inside a file

  • Owned by user - select Any to search for files owned by any user, or enter the name of a user as part of the search criteria. Only files owned by that user in the chosen directory will be searched.

  • Owned by group - select Any to search for files that are part of any group, or enter the name of a group as part of the search criteria. Only files that are part of that group in the chosen directory will be searched.

  • File type - select the type of file to search for from the drop down list:

    • Any - searches for any type of file (includes all the options in the drop down list)
    • File - only searches for files
    • Directory - only searches for directories
    • Symbolic link - only searches for symbolic links
    • Named pipes - only searches for named pipes

  • File size - this allows you to search for files that are larger or smaller than a specific size. This is useful if you want to find the files that are taking up the most space on your system

    • Any - searches with no file size restrictions
    • More than - searches for files larger than this size (in bytes)
    • Less than - searches for file smaller than this size (in bytes)
  • Search past mounts? - click Yes to search file systems that are mounted under the search directory, such as NSF file systems. Be aware that searching a remote file system can drastically slow down the search. Click No to avoid searching these mounted file systems.

Click on Search Now to start the search. When the search is complete, the files and directories that matched the search criteria will be listed in the Search results tab. You can double-click on the name of a file or directory and the File Manager will navigate to that location.

If you click on Download, your browser will attempt to open the file (if it is a text file). You may need to allow pop up windows in your browser for this to work.

(44 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).