If you are on the campus network, you can publish files by using an FTP client such as Fetch or WS-FTP. These programs allow you to move files from the hard disk or floppy disk on your computer—called "local"—to your account on frank—called "remote."
If you created your web pages with a local HTML editor and didn't use Homepage Creator as a starting point, you will need to create a subdirectory to hold your web pages. To create this subdirectory:
frank $ mkdir public_html
All of the files that you create or upload to your account on frank have default permissions that allow only you to read them. This keeps your memos, letters, and personal files protected from other people. However, you want all of your web page files to have file permissions that will allow anyone and everyone to read them.
The chmod command will allow you to change file permissions (read, write, or execute) for the user, group, others, or for all. To see a list of items in the directory and the permissions for each item, use the ll (long list) command:
frank $ lltotal 2
-rwxr--r-- 1 jdoe oit 427 Oct 30 13:44 index.html-rwxr-xr-x 1 jdoe oit 427 Oct 31 12:04 syllabus.html
drwxrwxrwx 1 jdoe oit 427 Oct 31 12:04 fall2000
The permissions are listed in the first column. The list always has 10 spaces, and the letters cannot switch places. The permission list for the first line is structured as follows:
| — | r w x | r — — | r — — |
|---|---|---|---|
| The first dash tells you that index.html is a file rather than a directory (folder). | The next three letters show the permissions that the user has on the file. | The second three characters show the permissions that the group has on the file. | The final set of characters shows the permissions that others (the world) have on the file. |
To change a permission on a file, at the frank prompt:
chmod spacebaru for user, g for group, o for other, or a for all groups+ if you are giving a permission or - if you are taking away a permissionr for read, w for write, or x for execute)ll at the frank promptUsually, you will want to give read permission to the group and others. If you want everyone to access (read and execute) files in your public_html directory, you would enter:
frank$ chmod a+rx public_html
Often, you will have uploaded several files and will want to change the permission on all of them. You can change the permissions of all files in public_html with a wildcard (*).
Note:Make sure your present working directory (pwd) is public_html before you use this command.
frank $ pwd enter
frank $ /users/depts/username/public_html
frank $ chmod a+r *
This command gives user, group, and other (a) read permission (r) on all files (*) in the public_html directory.