Serversftp Page 2

ftp Page 2

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.




The first thing you need to do before you begin working on the program is to properly understand your FTP software. A large percentage of the errors encountered when installing a Perl program come from improper use of the FTP program (telnet will not be covered). Your FTP software is a crucial component of installing a Perl program as it is what enables you to assign the program the appropriate permissions or security settings. The permissions of programs or files tells the server what the file is capable of doing or not doing. For example, if I want to write a program that modifies a text file, I need to set the permissions accordingly for the specified text file. If they are set incorrectly the server will not be able to write or append data to it. Almost all of the interfaces of the various FTP programs are strikingly similar. Under most circumstances, we will select a file or folder, usually just by
clicking on it once to highlight it, and then go to one of our menu items to access our file permission settings. We want to find the command labeled “file attributes” or “permissions.” This will bring up a dialog box that will present us with a series of check boxes for Owner, Group, and Public permissions. These three different categories allow you to specify permissions for each category of Read, Write or Execute.

If we break these down numerically, the number 4 means read, the number 2 means write and the number 1 means execute. You add these numbers together to grant or give permissions to each category (Owner, Group, or Public). If we were to chmod xyz somefile.txt (normally you would chmod or set a program’s permission to 755), the owner’s permissions are defined by the x number, group permissions are defined by y, and z refers to everyone else or the public. Let’s take this a step further and say that we want to chmod 755 somfile.txt. We are giving the owner 7 (4 + 2 + 1 = read/write/execute), the group 5 (4 + 1= read/execute), and everyone 5 (4 + 1 = read/execute). Let’s plug this into our matrix to better understand what it is we are doing:

Owner (x) Group (y) Everyone (z)
Read
(Value of 4)
x x x
Write (Value of 2) x
Execute
(Value of 1)
x x x
chmod (4+2+1)

Get the Free Newsletter!

Subscribe to Daily Tech Insider for top news, trends & analysis

Latest Posts

Related Stories