FTP is not the only way to manage files and directories in your hosting account. cPanel includes a
File Manager that will allow you to do almost anything you can via FTP (and a number of things that
cannot be done via FTP) right in your web browser. The cPanel File Manager does have limitations
that do not make it an ideal choice if you need to work with lots of files. However, it can come in
quite handy at times, especially for quick remote edits without access to an FTP client.

To start using the cPanel File Manager, log into your cPanel account and click the File Manager
icon. A new window will open with the File Manager interface. On the left are your site and all
files and directories. On the right will appear information about whatever action you are trying
to perform.
Clicking on the name of a file or directory on the left will allow you to work with or rename that
item. Clicking the small folder icon next to a directory will open that directory and show you the
contents, where you can upload, download, or work with files there.
On the right side of the screen is a sidebar where you can perform basic actions on files or
directories you select (like view, edit, change permissions, throw them in the site trash, and so on).
A Few Words about File Permissions
If you work with files and directories on a Linux server it is important to understand a bit about
permissions. In order to make sure that only those people who are supposed to have access to a
directory or file can actually do so, Linux has a file and directory permission system. Every file
and directory has permissions set for three kinds of users:
• User: The owner or creator of the file or directory
• Group: A group of users that are permitted to use a directory or file in some way
• World: Everyone else who isn't the owner or creator or a member of the correct
group (You can think of world as public permissions)
For each kind of user, there are three basic categories of permissions:
• Read: Any type of user that is allowed read access can do just that, read a file. If a
user only has this permission, they can open the file or directory and see the contents,
but they may not make changes.
• Write: If the user has write permission, they can make changes to a file and save
those changes or in the case of a directory, they can put files and directories inside
that directory. It is possible to have write-only access to a directory or file.
• Execute: In the case of binary files (code designed to run on Linux), a user with
execute access can run that file or items in that directory. Think of this permission as
the ability to launch an application (though it is a bit more complex than that).
The most common method of referring to permissions is using a three-digit number. If you work
with web applications (scripts) you will often be told to set permissions on files or directories to
some three-digit number. The way this works is every type of permission has a certain unique
numerical value: Read permission is 4, Write permission is 2 and Execute permission is 1, no
permissions at all is 0. These numbers are added together for each kind of user. For example, a
user with Read and Write, but not Execute permission is assigned a value of 6. Every type of user
has their own numerical value expressed in the order of User, Group, World, for example, 755
(User has Read, Write, and Execute permissions; Group has Read and Execute permissions only
and so does World). The maximum number for each kind of user is 7. So 777 is Read, Write, and
Execute access for everyone (no restrictions at all).
The File Manager does the math for you. All you need to do is to check the various permission
categories for each kind of user.
If you want to figure out numerical Linux permissions but don't want to use the cPanel File
Manager, you can access an online version of this permissions calculator at
wsabstract.com/script/script2/chmodcal.shtml. This page also offers the code for
this web-based calculator so you can add it to your own website if you wish.
How are users and groups defined and assigned? Linux and cPanel handle it automatically. Any files
you upload via FTP or the cPanel File Manager will be assigned your main cPanel username as the
user and the group. Some web applications create files and directories with the user and group
nobody (this is just the name of the user and group, not an indication of who can access it) or your
cPanel username for both user and group. You should not need to change a file or directory's
assigned user or group, but if you do you should contact your web host to handle it for you.
If you make a mistake and put something in the trash that you want to get back, just click the name
of the directory or file that appears below the trashcan icon. Clicking the trash icon itself will
delete any directories or files that you have permission to delete that are currently in the site trash.
This action is not undoable. Make sure you actually delete the files in the trash or they will still
count against your disk space limits for your account (because the file is not actually deleted yet).
Close this window when you are done and you will be back at your cPanel.
cPanel's File Manager is not really designed for heavy-duty file manipulation (for example it isn't
designed to work on more than one item at a time), but it can come in handy if you just need to
make a few quick changes and you aren't in a place where you have access to a real FTP client.
However, there is one very nice thing about the File Manager it is logged into your account as a
special kind of user, so it can sometimes delete files and directories that you may not be able to
delete in your FTP client because you aren't listed as the owner of the file or directory. Be sure to
give it a try before contacting your web host for help. |