The River
User's Manual


Appendix A--Directories, Files & Permissions

General

This Appendix contains information that is more closely related to operating systems than to Yapp. Although we can't cover very much of that sort of information in this manual, we can try to give you just enough information to help you with the basics.

Yapp runs under Unix, and makes use of certain Unix commands. As a general rule, when a Unix command is invoked from inside Yapp it is preceded by a bang (!). In a few cases the ! is not required: ls,pwd and cd for instance; however, even in those cases the ! is permitted -- so if in doubt, bang.

Home directory

You automatically arrive in your home directory when you log in. At the OK prompt, type "pwd" (print working directory) to display your home directory. Example for user jerry:

Ok (? for help): pwd
/users/j/jerry

Certain setup files must be in your home directory or in your .cfdir subdirectory. You are free to use your home directory to store other files if you wish; however, disk space is limited, so please do not archive massive amounts of stuff here.

When you go into YAPP, you remain in your home directory unless you change directories.

Change directory

cd .cfdir       go to the .cfdir subdirectory from your home directory
cd .. go back up one directory from where you are
cd              go back to your home directory from anywhere

Make a new subdirectory

!mkdir juicy     create a subdirectory named juicy

Remove a subdirectory

!rmdir juicy     deletes directory juicy (must be empty first)

Files

Your home directory has several files and subdirectories in it. Here are a few OK prompt commands to see your files and subdirectories. For a complete list of parameters for the ls command, type "man ls".

ls              see regular files and subdirectories 
ls -a           see files, subdirectories and .files which the system uses 
ls -al          see files and subdirectories with detailed information 

You can delete a file by typing "!rm filename". Be careful -- there is no failsafe prompt to ask if you are sure you want to do this. A safer way is "!rm -i filename". In this case the system asks you to confirm the file deletion. This is particularly useful when you use wildcard notation to delete an entire set of files. The command "!rm -i file*" will remove all files with names beginning "file", and you will be asked to confirm the deletions file by file.

Copying Files

To copy a file, type "!cp filename destination". If you want to copy a file named gilligan to a subdirectory named Store, type:

!cp gilligan Store/gilligan

File security--permissions

When you create a file, by default it can be read by anyone. But you can change this by changing the file's "permissions." Let's suppose you have a file named secrets. Type "ls -l secrets". You get:

-rw-r--r--   1 jerry  users    2307 Dec  6 08:22 secrets

The business in the left column is the file's permissions. It is made up of four parts. The first character is - for a file or d for a directory. The next three characters control permissions for yourself, in this order: r (for read), w (for write) and x (for execute). The next three characters control permissions for a "group" -- but this is irrelevant here. The last three characters control permissions for everyone else. So, looking at the secrets file permissions:

-      it is a file, not a directory
rw-    you have read and write permission, not execute permission
r--    the group has read permission, not write or execute
r--    everyone else has read permission, not write or execute

To change permissions use the chmod command.

!chmod    [u][g][o]  [+]or[-]   [r][w][x]       filename 
u means user (that's you) 
g means group (ignore for now) 
o means other (everyone else) 
+ means add permission 
- means subtract permission 
r means read 
w means write
x means execute 

Examples:

!chmod u+x filename      make filename executable for yourself
!chmod go-w filename     no one but you can now write to this file
!chmod go-r filename     no one but you can now read this file  
!chmod ugo-r filename    no one at all can read this file (dumb!)
!chmod ugo+rwx filename  everyone can read, write and execute this file

So, to hide secrets from everyone:

!chmod go-r secrets 

Then use the ls command to verify what you just did.

ls -l secrets
-rw-------   1 jerry  users    2307 Dec  6 08:22 secrets

There, now your secrets are safe.

Directory Security

When you create a directory with the mkdir command, by default it is executable by everyone. That is, everyone can get a list of files in that directory. If you want the directory to be hidden from everyone, use the chmod command:

!chmod go-rwx juicy     no one but you can see what's in the juicy directory

Shell access

Type "csh" to leave Yapp temporarily and go to the Unix shell. The prompt is %. This provides access to most Unix features. This manual won't even *attempt* to discuss this.

Download/upload

Here is how you download a topic to read offline. Type "s 15 p > filename" to put everything in topic 15 of the conference you are in into a file named filename. Then use your communication program's download feature to copy the file to your own computer.

If you've composed a message offline, you can use your communications program to upload it to your River home directory, then put it in your message. After starting your message, on a new line type ":r filename" to put the text from the file into your message. Another easy way to get conference messages is to turn on the logging feature in your communication program.


If your question has not been answered by these manuals, you can send mail to (support03@river.org).

Manual Index

Documentation Main Page Conferencing Main Page

The River Home Page

This Manual was prepared by a team of River volunteers, under the leadership of Elizabeth Lipson. Send comments or revisions about manual content to (support03@river.org).

These web pages are maintained by webmaster03. Send notes about the page coding itself to (webmaster03@river.org)

Last modified 5/28/03