Your Home Directory
As a student or employee of MCECS, you have access to Windows, Linux and Unix computers within the school, and your personal files are available on all three of these operating sytstems. Having a basic understanding of how your files are stored on our systems will help you be successful in our computing environment. This guide describes how your Unix/Linux home directories work with your Windows S:\ and U:\ drives to make your personal files available across all of our supported systems.
The structure of your personal folders determines the following:
- Where you can place items you’d like to access from separate computers within MCECS
- Where you can place items you’d like to be accessible at your personal web space
- Where you can place items you’d like to be accessible from off-campus
Those who use Windows exclusively are minimally affected by the structure of these folders. If you fall into this category and this document seems overwhelming, you may safely ignore the folders described here in favor of using your N:\ drive, which is accessible from all MCECS Windows computers. You can view files inside your N:\ drive at home by using remote desktop, and transfer files to and from your N:\ drive using SFTP.
Unix, Linux, and Mac users will benefit from reading this document regardless of whether they use Windows machines.
MCECS is currently transitioning between two structures for user files:
- Those who received their MCECS accounts before November 1st, 2012 will have the old structure.
- Those who received their MCECS accounts after November 1st, 2012 will have the new strucutre.
This article includes a quick description of the best places to store certain types of files, followed by an in-depth description for interested users.
Please note that if you have an “old style” structure, you can decide to migrate to the new structure if you’d prefer to do so. However, there are significant caveats which may affect some users who have customized their environment. See the detailed description of the old structure at the bottom of this page for more information.
If you have the new directory structure
If your MCECS account was created after November 1st, 2012, the relevant parts of your home directories look like this:
The Desktop, Documents, Downloads, public_html, and smb_files directories are accessible from all operating systems. Anything you put in these directories will be available in the corresponding location on any MCECS computer. Anything outside of these directories will be available only on the operating system you created it with.
NOTE: If you are using a Windows machine, you may not make new folders, change the names of folders, or save files inside the top level of S:\ itself. You do, however, have full control over the contents of the S:\ drive’s existing folders.
Where to put your files
If you want to store regular files, for use on Linux, Unix and Windows, put them in Desktop, Documents, or Downloads. The smb_files directory is mostly included for legacy purposes, but it works as a regular directory as well.
The public_html directory is your space for web files. Anything you put into it will be visible at http://web.cecs.pdx.edu/~username.
If you have the old directory structure
NOTE: Users with the old structure should not use the S:\ drive in Windows
If you have the old structure, you will see an S:\ drive on Windows computers, and it will include several subfolders (Desktop, Documents, Downloads, public_html, and smb_files). Do not use these folders. They are part of the new structure and will not work correctly. If you’d like to use the S:\ drive, you must migrate to the new directory structure. You can do this by running a script; instructions are at the bottom of this page.
If your account was created before November 1st, 2012, the relevant parts of your home directories look like this:
The mail, public_html, and smb_files directories are accessible from all operating systems. Linux users should note that regardless of whether you are using Unix or Linux, you have access to /home/username/solaris and its subfolders. Use the cd command to navigate there or type the location into a file browser.
Anything in these three folders will be available in the corresponding location on each operating system. Anything outside of these folders will be available only on the operating system you created it with.
Please note that if you are using a Windows machine, you may not make new folders, change the names of folders, or save files inside the top level of U:/unixhome itself. You do, however, have full control over the contents of the existing folders inside.
Where to put your files
If you want to store regular files for use on Linux, Unix and Windows, put them in the smb_files folder. This means that for each system, you will put the files in the following places:
- On Unix: /home/solaris/username/smb_files
- On Linux: /home/solaris/username/smb_files
- On Windows: U:\unixhome\smb_files
The public_html directory is your space for web files. Anything you put into it will be available at http://web.cecs.pdx.edu/~your_username. This means that you should put web files in the following places:
- On Solaris: /home/solaris/username/public_html
- On Linux: /home/solaris/username/public_html
- On Windows: U:\unixhome\public_html
NOTE: Tampering with the mail folder’s contents could cause your MCECS email to disappear or malfunction.
General information for all users
In both the old and new structures, our files are stored on a Solaris Unix system and mirrored across home directories on other operating systems.
On Unix and Linux, this mirroring is accomplished with symlinks. On Windows, it is accomplished with redirected folders. Either way, any MCECS machine you log into will be able to interact with the standard set of common folders. Anything you store outside of these folders will only be available to you on the operating system you used to create it.
General information for Unix/Linux users
When you log into a Unix or Linux machine, you will appear to be in the directory /u/username. This is actually an alias. The real location of your home directory is /home/username/OS, where OS is the name of the operating system you are using.
For example, when you log into a Solaris Unix system, you will appear to be in /u/username, but you will actually be in /home/username/solaris. Similarly, when you log into a linux system, you will actually be in /home/username/ubuntu, /home/username/redhat5, or /home/username/redhat6, depending on which distribution of Linux you are using.
The new directory structure
A more techincally accurate representation of the new directory structure looks something like this:
Your common directories (Desktop, Documents, etc.) are actually stored in /home/username/common. From there, they are linked to the home directory of each type of Linux and Unix operating system and to the S:\ drive on Windows computers.
You may not make new directories or files inside of /home/username/common, but you have full control over the contents of its existing directories.
The /home/username/mail directory holds your email – work with this directory at your own risk. Making the wrong kinds of changes here can cause your email to malfunction or disappear.
The old directory structure
A more techincally accurate representation of the old directory structure looks something like this:
Your common directories (mail, public_html, and smb_files) are actually stored in /home/username/solaris. From here, they are linked to the unixhome folder inside the U:\ drive on Windows computers.
Migrating to the New Structure
NOTE: Please backup any important files before attempting this method.
If you currently have the old directory structure and would like to migrate to the new one, the CAT has a script you can use to make the conversion. However, please note that the script is somewhat dangerous and should not be used if you have a important files stored in your home directory that you have not backed up, or if you have created symlinks inside your home directory. For the most users, the script should run successfully, but be aware that the CAT does not assume any responsibility for damage to your files if something goes wrong. If you still want to use the script, make sure that your files are backed up before you run it.
The script can be found on any linux machine (linux.cecs.pdx.edu, for example), and is located at /usr/local/etc/link_to_common.sh. To run it, you can use the ssh command in a Linux/Mac Terminal or PuTTY on Windows to connect to linux.cecs.pdx.edu. Then type ./usr/local/etc/link_to_common.sh into the command prompt and press Enter. The script will ask for confirmation before execution.