The File Manager

Note

This page is often found when searching for 'linux maximum number files in a folder' or similar terms, so just a quick note. The ext2 and ext3 file systems allow over 100 trillion files to reside in single directory (folder). However having more than 10-15 thousand files in a single folder is impractical as searching through them will be too slow. This limitation does not apply for Linux systems which have the dir_index ext3 filesystem option enabled (this requires a 2.6 kernel). ReiserFS is another commonly used Linux filesystem which allows up to 518,701,895 files in a single folder. In practice 1,200,000 files can reside in a folder without any collisions.

The Control Panel's integrated File Manager is probably the easiest way to upload and download files or folders to your site. It will also allow you to copy, move, delete files and you will find it's ability to set permissions of a group of files very useful if you are concerned about security or if your CGI script refuses to run with an "Internal Server Error". Another neat feature is that you can quickly view and edit files on your site from within the file manager.

Using the File Manager

Click the "File Manager" link in the "Tools" group in the Control Panel home screen.

By default you will be brought to the "webroot" folder of your site. The files in this folder are accessible over the web with an url like "http://www.mysite.com/". For example if your webroot contains a file named about.html then you can access it over the web with an URL like "http://www.mysite.com/about.html". See Account Files Layout for details.

You are now seeing the default view of the File Manager - a folder listing. It has (like all other pages) a Navigation Bar at the top with "Home", "Preferences" and "Exit" links. The home link will return you to your default folder (you can change this in the preferenes page"). Exit will return you to your Control Panel.

By default entries are sorted by name and folders appear before regular files for easier navigation. Click on a folder name to enter it and view its contents.

The File Manager displays various information about the entries in a folder:

Here is a short explanation of the UNIX file permissions system.

The UNIX File Permissions System

There are three basic permissions: read (r), write (w) and execute (x). Read means that the entry can be read, write means that then entry can be written to and execute has different meanings depending on whether the entry is a file or a folder. For files the execute permissions means that the file is an executable script or program. For folders the execute permissions mean that the folder is "browsable", i.e. its contents can be listed.

Each file or folder has one owning user and one owning group. Perimissions are separated in three categories:

  1. Permissions for the owning user

  2. Permissions for members of the owning group

  3. Permissions for all other users in the system (sometimes referred to as world permissions)

Let's take a look at a typical example for file permissions rw-rw-r--

The first three symbols describe the owner permissions, the next three symbols are the owning group permissions and the last three are the permissions for all other users. So rw-rw-r-- can be translated into English like this: "This file can be read or written to by its owner, it is also readable and writable by all users belonging to the group that owns the file and it can be read but not written to by the rest of the world. No one can execute the file."

Working with multiple files

Most operations in the File Manager are performed on multiple files (or folders) at the same time. You need to select one or more entries from the list (there is a checkbox at the left of each entry) and then use one of the buttons at the bottom of the screen. Here are the operations that you can perform this way:

Download

This will create on the fly an archive contaning all the files you selected and your browser will prompt you for a location on your local machine to save the archive to. You can download your entire account with just two clicks in a convenient compressed format using nothing but a web browser! This is usually faster than FTP too since the files are transferred in a compressed form. The file manager supports many archive formats - ZIP, which is common on Windows machines and can be used on virtually all platforms and tar-based formats, tar is the standard archiving tool for the server's Linux operating system and is recommended if you're making backups and intend to upload and extract the archive on this server or on another server in the future. (The good thing about tar is that it knows about Linux permissions and is able to preserve them while ZIP does not and thus can break your CGI apps)

Delete

This will display all the files you have selected in a confirmation screen. Click "CONFIRM DELETE" to erase the files or "CANCEL" to return to the folder list without doing anything.

Move

This will display the files you selected and will prompt for a new location (folder) to move the files to. You will need to input a relative UNIX path. For example if you want to move the "public_html/www/about.html" file to your "about" subdomain the relative path you would enter is "public_html/about/"

Click "CONFIRM MOVE" to move the files or "CANCEL" to return to the folder list without doing anything.

Copy

This will display the files you selected and will prompt for a location (folder) to copy the files to. You will need to input a relative UNIX path. For example if you want to copy the "public_html/www/about.html" file to your "about" subdomain the relative path you would enter is "public_html/about/"

Click "CONFIRM COPY" to copy the files or "CANCEL" to return to the folder list without doing anything.

Permissions

This will let you change the permissions of the files you selected. Recommended permissions:

  • for regular files: rw-r--r--

  • for .phps files and CGI scripts: rwxr-x---

  • for folders: rwxr-xr-x

Click "SET PERMISSIONS" to update the permissions for the selected files or "CANCEL" to return to the folder list without doing anything.

Creatig new files and folders

There is a small form near the bottom of the folder list page for this task. You can follow these steps:

  1. Navigate to the location where you wish the new file or folder to appear.

  2. Enter a new name in the form at the bottom.

  3. Choose whether you're creating a new file or a new folder from the drop-down box in the form.

  4. Click the "CREATE" button.

Uploading files

You can upload a single file from the "Upload File" form at the bottom of the folder list page. Enter a local file name or select the file from the dialog that appears when you press the browse button. Then click "UPLOAD" and you're done.

If you want to upload more than one file click the "multiple files" link at the end of the Upload form. You will be brought to the Multiple File Upload screen. By default you can upload eight files at a time (you can change this in the preferences page)

Click "UPLOAD" to upload the files or "CANCEL" to return to the folder list without doing anything.

File Manager Preferences

Click the "Preferences" link in the navigation bar of the File Manager.

Here is a brief explanation of each option:

Click "SET PREFERENCES" to save your changes or "CANCEL" to return to the folder list without doing anything.