FTP stands for "File Transfer Protocol," and this is how you get your website from your computer, to our servers, then onto the Internet. If you don't FTP your site to us, it will not be available on the Web. Your web site design software may have FTP built-in as a "publish" command or you may want to use a separate program (an FTP client)just for FTPing.
- 1 CHMOD
- 2 scp / sftp
- 3 How do I download files from my web directory?
- 4 How do I upload to a sub-domain?
- 5 Can I upload files without an FTP client?
- 6 I don't know what the FTP address is!
- 7 How do I upload files (publish) to my site?
- 8 Deleting files/directories with special meta-characters.
- 9 How do you let people download files from your site?
CHMOD is a Unix command that lets you tell the system how much (or little) access it should permit to a file. All of your files and directories have a number of attributes that are set when they are created. To display the attributes of each file and directory in the working directory use the "ls -la" command in your shell account. Here is an example listing:
[user@linux sites]$ ls -la drwxr-xr-x 16 root root 1024 Oct 20 19:56 . drwxr-xr-x 9 root root 1024 Sep 5 22:56 .. drwxr-xr-x 9 foo user 1024 Sep 5 22:56 dir1 drwxr-xr-x 9 foo user 1024 Sep 5 22:56 dir2 drwxr-xr-x 9 foo user 1024 Sep 5 22:56 dir3 -rw-r--r-- 9 foo user 1024 Sep 5 22:56 file1 -rw-r--r-- 9 foo user 1024 Sep 5 22:56 file2 -rw-r--r-- 9 foo user 1024 Sep 5 22:56 file3
To the far left of each file or directory name there are ten characters which show the attributes. The first column indicates whether the entry is a directory (d) or not (-). The other nine characters are organized into three groups of the three.
(drwxr-xr-x) The first group pertains to the owner (that would be you for your files).
(drwxr-xr-x) The second group pertains to people in your group.
(drwxr-xr-x) The third group pertains to everyone else.
Within each group of three are three characters. The first indicates read (r) permission. The second indicates write (w) permission. The third indicates execute (x) permission. If the permission is not present, a ``- will replace the r, w, or x.
To perform a chmod change on a file you can either do it through your shell account or through an FTP client.
chmod mode filename
where mode is a three digit octal number. The first digit pertains to the owners privileges. The second pertains to the groups privileges, and the third pertains to everyone else's privileges. Each octal digit is composed of the addition of three components. The read component is worth 4, the write component worth 2, and the execute component worth 1. Suppose I wanted the owner to have read, write, and execute privileges, the group to have read and write privileges, and everyone else to have read privileges only. The octal number I would use with chmod would be 764.
scp / sftp
Scp and sftp are both part of OpenSSH, the secure shell server we run. Now that all of our users can have shell access, everyone can take advantage of these secure methods of transferring files.
Do note that you cannot use sftp with an FTP only user - despite the name, sftp has fairly little in common with FTP. In other words, you must enable shell access for a user before you can use sftp (or scp) with that account. Sftp is different from SSL-FTP (which we may begin offering in the future).
Here is some software to help you make secure file transfers to our machines. We don't officially provide support for any of this software, although many of us use it. http://winscp.vse.cz/eng/ (For Windows; recommended by Sage)
http://www.cygwin.com/ For those who prefer a command line interface (there are also some GUI front ends that use this as a back end), I highly recommend Cygwin. Cygwin isn't just an SSH / scp / sftp client - it's an entire UNIX environment for Windows. It comes with its own terminal program, and pretty much all of the GNU development utilities you could ever want. The installer is pretty slick as well.
http://www.cuteftp.com/ CuteFTP Pro has sftp support. I don't think the free version does, though.
http://macssh.com/ For all the Mac users who are feeling left out (except OS X users who can access to all of the stuff by using command line in Terminal or X11), you already have OpenSSH. If you're running OS 9, or if you don't like the command line interface, check out this link. macssh.com has an SFTP client, which is available for both Mac OS 9 and OS X. A number of FTP clients also support SFTP.
For some other suggestions, check out a site mentioned in our SSH article: http://freessh.org/.
Please let us know if you have positive (or negative) experiences with any of these programs, or if you discover a free and easy to use graphical client that you're happy with.
How do I download files from my web directory?
From time to time, you may want to download your web files to your computer --- for editing, safekeeping, whatever. But how do you do it? It's easy!
The following directions are illustrated using the WS_FTP FTP tool, but FTP tools all work in the same way, so if you're using a different tool, it should be easy to follow along anyway.For more information about different FTP tools (ie; FTP clients), click here.
- Open your ftp tool.
- FTP to your home directory, entering your username, path of your web directory, and your password.
- You will see two directories: <p align=center><img src="./images/illustrations/your_dir.gif"> The file list below this bar is on your computer. Navigate through this list to the destination on your computer, where you wish to send the files you will download. <p align=center><img src="./images/illustrations/remote_dir.gif"> The file list below this bar is your web directory.
- Find the name of the file you wish to download in your web directory. Click on it.
- Next, click on this button: <img src="./images/illustrations/download_button.gif">
- That's it! Now the file should be tranferred to your computer!</ol>
How do I upload to a sub-domain?
How do you upload web pages to a sub-domain? Do you make the FTP connection the same way as you do with a regular domain?
It's exactly the same as uploading to a regular domain. The only difference is you should connect to the subdomain (whatever.domain.com) with your FTP software, and you should put the files in the correct folder for your sub-domain (whatever you set it to be, most likely the name of the sub-domain!). You will need to connect as the user you chose the sub-domain to be under when you set it up. It's probably the same user you use for your main domain, but it may not be (depending on what you chose).
You can see what you chose by going to the Domains :: Web area of our Web Panel.
Just like with regular domains, anything you upload via ftp will take effect IMMEDIATELY. If you don't see the change, you might need to empty your browser's cache, or if your domain is a transfer, make sure you've successfully switched it over to us!
Can I upload files without an FTP client?
Many web browsers have built in support for FTP. While this support is fairly basic (ie. you can upload or overwrite files, but cannot delete existing ones), it is usually adequate for a quick edit or until you can download a real FTP client.
Connecting With A Browser Via The Web Panel
Click on the Manage area under the Domains section of the Web Panel.
Then click on the link the "FTP" link for the domain you'd like to upload to. Your web browser will launch, and you'll be asked to enter your FTP password (go ahead and do so). Confirm.
Each browser is a little different. Netscape and Internet Explorer both allow drag and drop editing of your web pages. Just drag the file you'd like to upload onto the window, and it should be sent to the server.
Connecting Directly Via Web Browser
If you don't want to open the Web Panel each and every time you wish to connect, you can also type (or bookmark) the following URL:
...Simply change "youruser" to your FTP user name, and "yourpass" to your FTP password. Note that if this is bookmarked, using that bookmark will not require you to type a password when using it. If you'd rather always be prompted for a password, bookmark the following URL instead:
Use DreamHost's Provided WebFTP (net2ftp) Utility
Another way you can upload, and manage, files on your server without using an FTP client is to use the DreamHost provided WebFTP utility (net2ftp). This method also requires only a web browser, but offers considerably more functionality than the "browser-based" FTP facility described in the preceding paragraphs.
To use this utility from the Control Panel, click on the "Manage Domains" area under the "Domains" section of the DreamHost Control Panel.
Then click on the "WebFTP" link for the domain to which you'd like to upload. Your web browser will launch, and you'll be asked to enter your FTP password (go ahead and do so). Confirm.
This will launch the WebFTP utility and provide a graphical user interface to many file management functions, including uploading.
Connecting to the WebFTP utility (net2ftp)Directly Via Web Browser
If you don't want to open the Web Panel each and every time you wish to connect using the WebFTP utility, you can also type (or bookmark) the following URL:
Enter your domain name, your FTP user name, and your FTP password, and any other setting you wish to apply to this session, and submit the login form. This will launch the WebFTP utility and provide a graphical user interface to many file management functions, including uploading.
I don't know what the FTP address is!
I'm hosting a site and I have no clue what to type in as the FTP address.
Just use yourdomain.com.
If you're using a subdomain, like yourdomain.dreamhosters.com, use that.
If your domain hasn't been set up yet on our servers, you can still connect directly to your server for ftp at: servername.dreamhost.com. You get your server's name in the welcome emails sent to you when your ftp account is first created!
Also note, your FTP username/password combo is different from your web ID username/password combo!
If you forget your ftp username, you can find it at our web panel's "Users > Users" area. If you forget your ftp password you can have it emailed to you from the "Users > Passwords" area. If you forget your account information completely, just try and log into the web panel and click the "Forgot your WebID or password" link!
How do I upload files (publish) to my site?
Publish your files by uploading them to our server, where they will be online at your domain until you delete them.
To upload your files, you must transfer them via an FTP (File Transfer Protocol) program.
- The recommended programs for Windows users are WSFTP and CuteFTP.
- For Mac users, Fetch is the recommended program.
- For all users, DreamHost WebFTP can be used, too
NOTE: If your client has an option for it, you must use Passive Mode (PASV) FTP transfers.
Put your files in the right folder
You will see a folder on our server called yourdomain.com. This is where you must send your web files in order for them to be seen at your web address.
Deleting files/directories with special meta-characters.
I have created a directory with a weird character in it (in this case, a tilde '~' character), and my FTP client won't let me delete it. I'd really like to get rid of it.
Many operating systems have special characters, called 'meta-characters', which carry special meanings. For instance, a period in a DOS/Windows style file name usually comes before the file's extension (which identifies the file type). Due to its DOS underpinnings, Windows also recognizes a whole host of other characters, such as asterisks and spaces as have special meanings.
The Macintosh only has one such character, the colon. All other characters are legal and perfectly usable in file and folder names.
Our servers run on Linux, which is a very close cousin to Unix. Just as with most forms of Unix, Linux has its own share of special characters. For example, take the following path name:
The forward-slash character (aka. '/') is a special character that designates the seperation between different directories and files. Here is another example:
In this case, the tilde character (aka. '~') is being used at the beginning of a path. Why? Well, the tilde is a special meta-character that denotes the start of a user's home directory. This is basically used as a shortcut for the standard '/home/username/' path. There are many characters such as these that carry special meanings.
Deleting Files/Directories With Odd Names
The tricky part about this is that you can actually use these characters in file and directory names (and occasionally, we find someone that does). Usually this doesn't cause too many problems until the point that an individual wishes to perform a function on the file or directory, and receives an error message. In particular, graphical FTP clients such as NetFinder or WS_FTP have trouble handling such filenames. If you attempt to delete such an item from your shell using the following command (as usual):
rm -r ~dirname
...you will usually end up gaining nothing but an error message. The way to delete such an item from a shell is to surround the file or directory name in quotes, ie.
rm -r "~dirname"
...this way, the name is interpreted exactly as it is typed, instead of applying special meaning to any particular meta-characters found (in this case, a tilde).
If you do not have a plan which provides shell access via telnet, just send us a message via the tech support form and we can delete the file or directory for you. Of course, the best technique to avoid such problems is generally to avoid creating items with such names to begin with.
How do you let people download files from your site?
All you have to do is link to them in your page's html code, just like you would any other document. So if you have myfile.zip, and you want people to be able to download it with a click, just put this html on your page (substitute the name of your file for myfile.zip):<href="myfile.zip">click here to download myfile.zip</a>