You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
5.8 KiB

<head>
<style type="text/css">
.title{
background-color:#ffffff;
font-size:x-large;
color:#2a2a2a;
}
.header{
background-color:#ffffff;
/* font-size:20px; */
font-size:x-large;
color:#2a2a2a;
}
.body{
background-color:#ffffff;
font-size:medium;
color:#2a2a2a;
}
.reference{
border: 1px dotted #000;
text-align: left;
padding: 5px;
padding: 15px 30px 15px;
background:#CCC url('http://sdf.org/tutorials/images/ref.png') 5px 5px no-repeat;
color: #000;
margin: 10px 5px;
}
.link { text-decoration:none }
.superscript{
font-size:10px;
vertical-align:top;
}
.subscript{
font-size:10px;
vertical-align:bottom;
}
.note{
border: 1px dotted #000;
text-align: left;
padding: 5px;
padding: 15px 30px 15px;
background: #DC143C url('http://sdf.org/tutorials/images/note.png') 5px 5px no-repeat;
color: #FFF;
margin: 10px 5px;
}
.code{
border: 1px dotted #000;
text-align: left;
padding: 5px;
padding: 15px 30px 15px;
background:#2F4F4F url('http://sdf.org/tutorials/images/code.png') 5px 5px no-repeat;
color: #00FF00;
margin: 10px 5px;
font-family: monospace;
}
table.table {
border-width: 0px;
border-spacing: 0px;
border-style: none;
border-collapse: collapse;
background-color: #1E90FF;
}
table.table th {
border-width: 1px;
padding: 1px;
border-style: inset;
border-color: white;
background-color: #A0522D;
-moz-border-radius: ;
padding: 10;
}
table.table td {
border-width: 1px;
padding: 1px;
border-style: inset;
border-color: white;
background-color: #FFEBCD;
-moz-border-radius: ;
padding: 5;
}
</style>
</head>
<div class="title" id="SSHFS-SDF" style="margin-bottom:0px;"><a name="sshfs-sdf"></a><h1>SSHFS-SDF</h1>
<h2 class="title">How to mount your SDF user folder locally on your linux workstation.</h2>
<dl class="body">
<dt><a href="#intro">Overview</a></dt>
<dt><a href="#install">Installing on your machine</a></dt>
<dt><a href="#athome">Use on your machine</a></dt>
<dt><a href="#atma">Use on the Meta-Array</a></dt>
</dl>
<h1 class="header"><a name="intro"></a>OVERVIEW:What is sshfs?</h1>
<p class="body">SSHFS (SSH File System or Secure SHell File System) is a file system client to mount and interact with directories and files located on a remote server or workstation. The client interacts with the remote file system via SFTP. It appears on your file system as if it were a local directory and you can manipulate the files as you would normally on your workstation.</p>
<p class="body"> The current implementation of SSHFS using FUSE is a rewrite of an earlier version. The rewrite was done by Miklos Szeredi, who also wrote FUSE sshfs is a way to mount file systems on a network server on your client machine sshfs to mount network drives via ssh to local machine.</p>
<h1 class="header"><a name="install"></a>How to install Ubuntu/Debian Linux example</h1>
<ul><li class="header">On command line use apt-get to install sshfs</li></ul>
<p class="code">sudo apt-get install sshfs</p>
<ul><li class="header">Create a director in your /media folder to mount the sdf user folder to</li></ul>
<p class="code">sudo mkdir /media/sdf</p>
<ul><li class="header">Change ownership to you local systems user name</li></ul>
<p class="code">sudo chown your-local-system-username /media/sdf</p>
<ul><li class="header">Add you local system user name to the fuse group</li></ul>
<p class="code">sudo adduser your-local-system-username fuse</p>
<h1 class="header"><a name="athome"></a>How to mount the SDF user folder</h1>
<p class="body">Your path to your user name depends on the letter your user name begins with. Someuser is below in the example you will need to tailor it to your own user name. You can use the pwd command at the shell to see where exactly it is. The last part of the command tell it where to mount on local system.</p>
<p class="body">You could also mount your www folder as well you need to run the mkhompg command to see where it is. Note if you plan to mount both you need to create a seperate folder for each folder you plan to mount on your local machine.</p>
<p class="code">sshfs sdf.lonestar.org:/arpa/ns/s/someuser /media/sdf</p>
<h1 class="header">How to unmount the SDF user folder</h1>
<ul><li class="header">Adds it to modprobe</li></ul>
<p class="code">sudo modprobe fuse</p>
<ul><li class="header">Unmounts file system</li></ul>
<p class="code">fusermount -u /media/sdf</p>
<h1 class="header">More info on sshfs</h1>
<p class="body"><a style="color:#3465A4" href="http://fuse.sourceforge.net/sshfs.html">http://fuse.sourceforge.net/sshfs.html</a></p>
<hr/>
<h1 class="header"><a name="atma"></a>Mounting directories from other machines on the <a href="http://sdf.org/?tutorials/metaarray">Meta-Array</a></h1>
<p class="body">fuse-sshfs is installed on the Meta-Array, so you may use the above instructions to mount any ssh accessible machine to a local folder on ma.sdf.org</p>
<p class="code">sshfs example@example.com:/home/example "$HOME/example_mountpoint" -o follow_symlinks</p>
<p class="body">As above, you can unmount using fusermount</p>
<p class="code">fusermount -u $HOME/example_mountpoint</p>
<p class="body">In order to map your remote userid and groupid so that
permissions and ownership works use the idmap and gid options</p>
<p class="code">sshfs example@example.com:/home/example
"$HOME/example_mountpoint" -o follow_symlinks -o idmap=user -o
gid=500</p>
<p class="body">where 500 is the gid for the ARPA group</p>
<p class="code">[0 ~/remote/code]$ touch main.c</p>
<p class="body">After creating file over an sshfs-mounted filesystem, a
listing indicates correct user and group ownership</p>
<p class="code">-rw------- 1 xcitor arpa 0 Jul 10 01:08 main.c</p>
<div class="body">
<!-- ------------------------------------------------------------------- -->
<hr/>
<cite>$Id: sshfs.html,v 1.9 2012/07/10 10:51:33 xcitor Exp $</cite>
</div>
<div class="body">