Hoffman2:Sharing Filesystems: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (7 revisions) |
(No difference)
|
Revision as of 03:15, 16 January 2014
There are apps for linking filesystems so that you can access data across machines. It's like mounting a shared drive. Here we present a GUI and a command line way of accomplishing this.
MacFusion
GUIs are nice, and things just work here.
Installation
- Go to http://osxfuse.github.com/ and download and install OSXFuse.
- Go to MacFusion and download and install MacFusion (Download a build of the development version).
Usage
Let's walk through how to connect to Hoffman2.
- Start up the MacFusion program.
- Let it start the macfusion agent process.
- Click the plus button and select "sshfs" from the drop-down menu
- In the first blank, fill in a name for this link, like "Hoffman2."
- Fill in the other blanks in the SSH tab:
- Host - address of the server
hoffman2.idre.ucla.edu
- User Name - your username on the server
joebruin
- Password - leave this blank if you want to type your password (for the server) every time you connect (more secure). Or just plug in your password (to the server) for convenience.
- Path - by default it will connect to your home folder on the server, but you can specify any part of the filesystem you have access to.
- Host - address of the server
- In the "Advanced" tab:
- Options - to stop the program from giving you a hard time about what you do and don't have permission to read, add the text
-o defer_permissions
- Options - to stop the program from giving you a hard time about what you do and don't have permission to read, add the text
- In the Macfusion tab:
- Mount Point - where on your local filesystem you want this drive mounted.
- Volume Name - what name do you want the drive to have? This is the name that shows up under the icon that will appear on your desktop.
- Click "OK" when you are done.
- Click "Mount" on the new connection that appears and type in your password if
sshfs
This tool is pre-installed on all lab computers (type which sshfs
on the command line to check). But if this is your own computer, follow the install instructions.
Installation
Command lines can be more extensible
- Install MacPorts. The instructions they have over there are great. This is a package distribution tool where you can easily find and install other tools like watch, different versions of python, and htop. The best part is that it installs all the dependencies for you.
- Execute
$ sudo port install sshfs
- Type your password when asked
- Installation should complete smoothly.
Usage
Let's say you want to mount Hoffman2 locally. On the command line, execute
$ id uid=1010(joebruinuser) gid=20(bruingroup1),23(bruingroup2),... $ mkdir /Volumes/MOUNTPOINT $ sshfs -o idmap=user -o uid=1010 -o gid=20 USERNAME@hoffman2.idre.ucla.edu:/path/to/mount /Volumes/MOUNTPOINT
Where
id
- Gets information about your local user, including your numerical ID and group ID(s)
-o idmap=user -o uid=1010 -o gid=20
- Translates your local user and group IDs to that of the remote user so you can read and write files as if you were on the remote machine. Make sure to put the correct user and group IDs that were returned by the
id
command. USERNAME
- Is your username at the remote computer
hoffman2.idre.ucla.edu
- Is the address of the remote computer you are connecting to.
/path/to/mount
- Could be left blank to mount your home directory from the remote computer, or it could specify any point in the remote filesystem
MOUNTPOINT
- Is the name of the directory where the remote filesystem will be mounted.
To unmount:
- Use the command
umount /Volumes/MOUNTPOINT
or
- Right click on the desktop icon that appears and select "Eject."