]> sipb.mit.edu Git - wiki.git/blobdiff - doc/afs-and-you.html
litacl is not lit. it does nothing. listacl is more useful.
[wiki.git] / doc / afs-and-you.html
index 2deaf6444a7cb7fa1b00bd1de0bd602d83159693..1bf75b259b68590e09d1344fb046107e4457c0f6 100644 (file)
@@ -19,7 +19,7 @@
                        </ol>
                <li><a href="#Troubleshooting">Troubleshooting</a>
                        <ol>
-                               <li><a href="#ImtryingtoaccessmyfilesfslasaysIshouldhavepermissionsherebutitstillsays:Permissiondenied">I'm trying to access my files, <tt>fs la</tt> says I should have permissions  &hellip;</a></li>
+                               <li><a href="#ImtryingtoaccessmyfilesfslasaysIshouldhavepermissionsherebutitstillsays">I'm trying to access my files, <tt>fs listacl</tt> says I should have permissions  &hellip;</a></li>
                                <li><a href="#IdreallypreferthatnoteveryonecouldlistmyfileshowshouldIstopthis">I'd really prefer that not everyone could list my files, how should I stop  &hellip;</a></li>
                                <li><a href="#Itwasaround6amonaSundaymorningandsuddenlyIcouldntaccessmyfiles">It was around 6am on a Sunday morning and suddenly I couldn't access my  &hellip;</a></li>
                                <li><a href="#ItisntSundayandIcantgettomyfiles">It isn't Sunday and I can't get to my files</a></li>
@@ -43,7 +43,7 @@ Credit goes to them, blame goes to him.
 </p>
 <h2 id="WhatisAFS">What is AFS?</h2>
 <p>
-<strong>AFS</strong> (previously the <strong>Andrew File System</strong> or ) is a distributed network file system invented at <a href="http://www.cmu.edu/index.shtml">Carnegie Mellon University</a> as part of Project Andrew (approximately their equivalent of MIT's Project Athena). More importantly, it is the file system used to store most files on Athena today. This includes your personal home directory, the data and websites of many living groups and student groups on campus, and probably some of the software you run (if you ever use Athena clusters). (Though most user directories were migrated from NFS in the summer of 1992, some files still remain on NFS and, of course, various file systems are used on personal computers and servers.)
+<strong>AFS</strong> (previously the <strong>Andrew File System</strong> or ) is a distributed network file system invented at <a href="https://www.cmu.edu/index.shtml">Carnegie Mellon University</a> as part of Project Andrew (approximately their equivalent of MIT's Project Athena). More importantly, it is the file system used to store most files on Athena today. This includes your personal home directory, the data and websites of many living groups and student groups on campus, and probably some of the software you run (if you ever use Athena clusters). (Though most user directories were migrated from NFS in the summer of 1992, some files still remain on NFS and, of course, various file systems are used on personal computers and servers.)
 
 </p>
 <p>
@@ -80,7 +80,7 @@ By default, this directory can only be read and can only be <i>listed</i> by you
 
 This folder is a link to a read-only copy of a backup of your files (created nightly around 3 a.m.). This copy cannot be edited and does not count against the locker's quota. From a technical standpoint, this is a separate volume with .backup appended (e.g. user.&lt;username&gt;.backup ) and is stored only as changes against the current copy.
 </dd><dt><strong><tt>www</tt></strong></dt><dd>
-Where you should put a website, if you want one. There is very little special about this directory from an AFS standpoint, but it is world-readable (like Public) and is linked directly to <tt>http://www.mit.edu/~&lt;lockername&gt;</tt> as well as <tt>http://web.mit.edu/&lt;lockername&gt;/www/</tt>.
+Where you should put a website, if you want one. There is very little special about this directory from an AFS standpoint, but it is world-readable (like Public) and is linked directly to <tt>https://www.mit.edu/~&lt;lockername&gt;</tt> as well as <tt>https://web.mit.edu/&lt;lockername&gt;/www/</tt>.
 </dd></dl>
 <h2 id="AccessingLockers">Accessing Lockers</h2>
 <h3 id="FromAthena">From Athena</h3>
@@ -89,7 +89,7 @@ Where you should put a website, if you want one. There is very little special ab
 On Athena, you can access a locker either as its full AFS path, if you know it (e.g. <tt>/afs/athena.mit.edu/course/6/6.01</tt>), or under <tt>/mit</tt> if it is "attached." Though you can always use the full path, you often want to attach lockers because it is easier to refer to them and software is set up to run with a path under <tt>/mit</tt>. There are a few ways to attach a locker: 
 
 </p>
-<ul><li>If you are running on a <a href="http://debathena.mit.edu">Debathena</a> machine, such as <a href="http://linerva.mit.edu">linerva.mit.edu</a>, then simply <tt>cd /mit/&lt;locker&gt;</tt> and it will be auto-attached.
+<ul><li>If you are running on a <a href="https://debathena.mit.edu">Debathena</a> machine, such as <a href="http://linerva.mit.edu">linerva.mit.edu</a>, then simply <tt>cd /mit/&lt;locker&gt;</tt> and it will be auto-attached.
 </li><li>If you are on another Athena machine and don't want to run software out of the locker, than simply type <tt>attach &lt;locker&gt;</tt> and then <tt>cd</tt> to it.
 
 </li><li>If, however, you want to use software in the locker, you will be better served by running <tt>add &lt;locker&gt;</tt> (e.g. <tt>add ruby-lang</tt>). This will attach the locker at <tt>/mit/&lt;locker&gt;</tt> and will add the <tt>bin</tt> directory (for your architecture) of that locker to your PATH and the <tt>man</tt> directory to your MANPATH. What this means is that you should be able to run any program located in that locker by simply typing the name of the program at the command line.
@@ -97,13 +97,13 @@ On Athena, you can access a locker either as its full AFS path, if you know it (
 
 </li></ul></li></ul><h3 id="FromtheWeb">From the Web</h3>
 <p>
-Generally any locker that you would access on Athena as <tt>/mit/&lt;locker&gt;</tt> is accessible on the web as <tt>http://web.mit.edu/&lt;locker&gt;</tt>. For example, the barnowl locker is at <a href="http://web.mit.edu/barnowl">http://web.mit.edu/barnowl</a>. As you can see, if there is no index.html (see below), the files in the directory are listed. By default, however, none of the contents are readable except in the <tt>www</tt> and <tt>Public</tt> folders.
+Generally any locker that you would access on Athena as <tt>/mit/&lt;locker&gt;</tt> is accessible on the web as <tt>https://web.mit.edu/&lt;locker&gt;</tt>. For example, the barnowl locker is at <a href="https://web.mit.edu/barnowl">https://web.mit.edu/barnowl</a>. As you can see, if there is no index.html (see below), the files in the directory are listed. By default, however, none of the contents are readable except in the <tt>www</tt> and <tt>Public</tt> folders.
 
 </p>
 <p>
-Also, you may access something in one of the MIT AFS cells by typing its full AFS path after web.mit.edu (<a href="http://web.mit.edu/afs/athena.mit.edu/activity/c/chess-club">http://web.mit.edu/afs/athena.mit.edu/activity/c/chess-club</a>). (That link also shows that if you have a text file named README readable, as a link to Public/README for example, its contents will be displayed below the directory listing).
+Also, you may access something in one of the MIT AFS cells by typing its full AFS path after web.mit.edu (<a href="https://web.mit.edu/afs/athena.mit.edu/activity/c/chess-club">https://web.mit.edu/afs/athena.mit.edu/activity/c/chess-club</a>). (That link also shows that if you have a text file named README readable, as a link to Public/README for example, its contents will be displayed below the directory listing).
 
-Note that when accessed from web.mit.edu (or www.mit.edu), only static files may be shown. If you are interested in serving dynamic content (such as a blog or wiki using PHP, Perl, Python, Ruby, etc.), you should check out SIPB's Scripts dynamic web service. See <a href="http://scripts.mit.edu">http://scripts.mit.edu</a> for more information.
+Note that when accessed from web.mit.edu (or www.mit.edu), only static files may be shown. If you are interested in serving dynamic content (such as a blog or wiki using PHP, Perl, Python, Ruby, etc.), you should check out SIPB's Scripts dynamic web service. See <a href="https://scripts.mit.edu">https://scripts.mit.edu</a> for more information.
 </p>
 <h2 id="CheckingQuota">Checking Quota</h2>
 <p>
@@ -122,10 +122,10 @@ If this information is good enough for you, then you are done. If not, read on.
 You may be familiar with Unix permissions. Sad to say, but that knowledge is more or less useless here. While Unix permissions are per-file, AFS permissions are controlled by <strong>Access Control List</strong>s (<strong>ACL</strong>s) on a per-directory basis. (AFS does however, attend to the e<stong>x</strong>ecute Unix permission on a file. )
 </p>
 <p>
-To view the ACL for a given directory (where you have permission to do so), run <tt>fs listacl</tt> or <tt>fs la</tt>, for short. For a typical user locker, the ACL in the top level will look like this 
+To view the ACL for a given directory (where you have permission to do so), run <tt>fs listacl</tt>, or <tt>fs la</tt> for short. For a typical user locker, the ACL in the top level will look like this 
 
 </p>
-<pre>user@host:~$ fs la
+<pre>user@host:~$ fs listacl
 Access list for . is
 Normal rights:
   system:expunge ld
@@ -152,7 +152,7 @@ This is a list of users or <a href="#CreatinganAFSGroup">AFS groups</a> and thei
 To add a user or group to the ACL for a given directory simply run <tt>fs setacl</tt> or <tt>fs sa</tt> as follows:
 
 </p>
-<pre>fs sa &lt;directory&gt; &lt;user or group&gt; &lt;permissions&gt; [&lt;user or group&gt; &lt;permissions&gt;]*
+<pre>fs setacl -dir &lt;directory&gt; [&lt;directory&gt;]* -acl &lt;user or group&gt; &lt;permissions&gt; [&lt;user or group&gt; &lt;permissions&gt;]*
 </pre><dl><dt><tt>&lt;directory&gt;</tt></dt><dd>
 can be an absolute or relative path, usually you will want <tt>.</tt>
 </dd><dt><tt>&lt;user or group&gt;</tt></dt><dd>
@@ -166,11 +166,11 @@ can be a string of the above letters (in any order) or any of the words <tt>read
 For example, if <tt>user</tt> wants his friends <tt>sipbtest</tt> and <tt>jarandom</tt> to be able to read and write files and anyone to be able to read files in his <tt>awesome_project</tt> directory, he might have a session that looks like this
 </p>
 <pre>user@host:~$ cd awesome_project/
-user@host:~/awesome_project$ fs sa . system:anyuser read
-user@host:~/awesome_project$ fs sa . jarandom write
-user@host:~/awesome_project$ fs sa . sipbtest write
-user@host:~/awesome_project$ #alternatively: fs sa . system:anyuser read jarandom write sipbtest write
-user@host:~/awesome_project$ fs la
+user@host:~/awesome_project$ fs setacl -dir . -acl system:anyuser read
+user@host:~/awesome_project$ fs setacl -dir . -acl jarandom write
+user@host:~/awesome_project$ fs setacl -dir . -acl sipbtest write
+user@host:~/awesome_project$ #alternatively: fs setacl -dir . -acl system:anyuser read jarandom write sipbtest write
+user@host:~/awesome_project$ fs listacl
 Access list for . is
 Normal rights:
   system:expunge ld
@@ -183,13 +183,13 @@ user@host:~/awesome_project$
 </pre><p>
 See also: <tt>man 1 fs</tt>, <tt>fs help &lt;command&gt;</tt>, <tt>man fs_listacl</tt>.
 
-There is also such thing as negative permissions to deny rights to certain members of a larger group to which positive permissions are granted. In the words of the fs_setacl manpage, however, <blockquote>Setting negative permissions is generally unnecessary and not recommended. Simply omitting a user or group from the "Normal rights" section of the ACL is normally adequate to prevent access. In particular, note that it is futile to deny permissions that are granted to members of the system:anyuser group on the same ACL; the user needs only to issue the unlog command to receive the denied permissions.</blockquote> For an example of negative permissions used on Athena run <tt>fs la /afs/athena.mit.edu/contrib/games/</tt>.
+There is also such thing as negative permissions to deny rights to certain members of a larger group to which positive permissions are granted. In the words of the fs_setacl manpage, however, <blockquote>Setting negative permissions is generally unnecessary and not recommended. Simply omitting a user or group from the "Normal rights" section of the ACL is normally adequate to prevent access. In particular, note that it is futile to deny permissions that are granted to members of the system:anyuser group on the same ACL; the user needs only to issue the unlog command to receive the denied permissions.</blockquote> For an example of negative permissions used on Athena run <tt>fs listacl /afs/athena.mit.edu/contrib/games/</tt>.
 
 
 </p>
 <h2 id="CreatinganAFSGroup">Creating an AFS Group</h2>
 <p>
-The "normal" way to make an AFS group would be with a command similar to <tt>pts creategroup &lt;your user name&gt;:&lt;group name&gt;</tt> and then add people with <tt>pts adduser &lt;user&gt; &lt;full group name&gt;</tt>(e.g. If Donald Guy wanted to created a group for people to edit his www directory (including <tt>sipbtest</tt> and <tt>jflorey</tt>, he might use the following chain of commands <tt>pts creategroup fawkes:www ; pts adduser sipbtest fawkes:www; pts adduser jflorey fawkes:www; fs sa /mit/fawkes/www fawkes:www write</tt>
+The "normal" way to make an AFS group would be with a command similar to <tt>pts creategroup &lt;your user name&gt;:&lt;group name&gt;</tt> and then add people with <tt>pts adduser &lt;user&gt; &lt;full group name&gt;</tt>(e.g. If Donald Guy wanted to created a group for people to edit his www directory (including <tt>sipbtest</tt> and <tt>jflorey</tt>, he might use the following chain of commands <tt>pts creategroup fawkes:www; pts adduser sipbtest fawkes:www; pts adduser jflorey fawkes:www; fs setacl -dir /mit/fawkes/www -acl fawkes:www write</tt>
 </p>
 <p>
 You can see general information about a group by running <tt>pts examine &lt;group&gt;</tt> and see the membership of a group by running <tt>pts membership &lt;group&gt;</tt>. In the above example:
@@ -197,7 +197,7 @@ You can see general information about a group by running <tt>pts examine &lt;gro
 fawkes@dr-wily:~$ pts examine fawkes:www
 Name: fawkes:www, id: -33555072, owner: fawkes, creator: fawkes,
   membership: 2, flags: S-M--, group quota: 0.
-fawkes@dr-wily:~$ pts mem fawkes:www
+fawkes@dr-wily:~$ pts membership fawkes:www
 Members of fawkes:www (id: -33555072) are:
   jflorey
   sipbtest
@@ -219,38 +219,31 @@ see also: <tt>man 1 pts</tt>
 </p>
 <h2 id="ControllingAccessfromtheWeb">Controlling Access from the Web</h2>
 <p>
-If you make a directory listable and readable by system:anyuser then it can be viewed by any user on the web via the UTLs mentioned <a href="#FromtheWeb">above</a>
+If you make a directory listable and readable by system:anyuser then it can be viewed by any user on the web via the URLs mentioned <a href="#FromtheWeb">above</a>
 </p>
 <p>
 Unfortunately, adding specific users to an AFS ACL does not mean they can see the folder when they access it from the web. IS&amp;T, however, does provide a solution to this. First, make sure that the wanted directory is not readable by system:anyuser. Create a file named <tt>.htaccess.mit</tt> in that directory. In that file you can do one of three things, 
 
 </p>
 <ul><li>You can require that the user have valid certificates:
-<pre>  &lt;limit GET&gt;
-  require valid-user
-  &lt;/limit&gt;
+<pre>require valid-user
 </pre></li></ul><ul><li>You can require the reader be (a) specific user(s), for example:
-<pre>  &lt;limit GET&gt;
-  require user fawkes jflorey sipbtest jarandom
-  &lt;/limit&gt;
-
+<pre>require user fawkes jflorey sipbtest jarandom
 </pre></li><li>You can require that the reader be a member of one of certain moira groups (notice these are <strong>moira</strong> groups, there is no "system:". For example:
-<pre> &lt;limit GET&gt;
-  require group sipb-staff sipb-prospectives
- &lt;/limit&gt;
+<pre>require group sipb-staff sipb-prospectives
 </pre></li></ul><p>
-<p>Note that you cannot mix users and groups in the same directory</p>.
+<p>Note that you cannot mix users and groups in the same directory.</p>
 
-<p>Finally <tt>fs sa &lt;dir&gt; system:htaccess.mit read </tt>.</p>
+<p>Finally <tt>fs setacl -dir &lt;dir&gt; -acl system:htaccess.mit read</tt>.</p>
         
 Thereafter, the users should be able to get to the folders at <tt>http<b>s</b>://web.mit.edu/&lt;locker&gt;/&lt;path to folder&gt;</tt> if they have certificates and no one should be able to reach it via http. Make sure to add yourself if you are going to be accessing it.
 
 </p>
 <p>
-see also: <a href="http://ist.mit.edu/services/web/reference/web-resources/https">http://ist.mit.edu/services/web/reference/web-resources/https</a>
+see also: <a href="https://ist.mit.edu/services/web/reference/web-resources/https">https://ist.mit.edu/services/web/reference/web-resources/https</a>
 </p>
 <h2 id="Troubleshooting">Troubleshooting</h2>
-<h3 id="ImtryingtoaccessmyfilesfslasaysIshouldhavepermissionsherebutitstillsays:Permissiondenied">I'm trying to access my files, <tt>fs la</tt> says I should have permissions here, but it still says <tt>: Permission denied</tt></h3>
+<h3 id="ImtryingtoaccessmyfilesfslasaysIshouldhavepermissionsherebutitstillsays">I'm trying to access my files, <tt>fs listacl</tt> says I should have permissions here, but it still says <tt>: Permission denied</tt></h3>
 <p>
 There are two likely possibilities. First, its likely that your tokens may have expired. You can check this by running <tt>tokens</tt>. If they are, in fact, expired (or missing) get new tokens as follows: first, make sure you have valid kerberos tickets and then run <tt>aklog</tt>. Another possibility is that you have tokens but not for the correct cell. <tt>tokens</tt> will tell you what tokens you already have. In all likelihood, if you are reading this, you probably want <tt>aklog athena sipb</tt>. Finally, a third possibility is that your group membership has changed since you acquired tokens. Try running <tt>aklog -force</tt>
 
@@ -262,10 +255,10 @@ What you <strong>don't</strong> want to do is take away the l permission from <t
 </p>
 <pre>&lt;html&gt;
 &lt;head&gt;
-  &lt;meta http-equiv="Refresh" content="0; url=http://web.mit.edu/&lt;lockername&gt;/www"&gt;
+  &lt;meta http-equiv="Refresh" content="0; url=https://web.mit.edu/&lt;lockername&gt;/www"&gt;
 &lt;/head&gt;
 &lt;body&gt;
-  &lt;p&gt;Please go to my &lt;a href="http://web.mit.edu/&lt;lockername&gt;/www"&gt;www/a&gt;!&lt;/p&gt;
+  &lt;p&gt;Please go to my &lt;a href="https://web.mit.edu/&lt;lockername&gt;/www"&gt;www&lt;/a&gt;!&lt;/p&gt;
 
 &lt;/body&gt;
 &lt;/html&gt;
@@ -279,7 +272,7 @@ Most AFS servers restart weekly at 6 AM on Sunday.
 </p>
 <h3 id="ItisntSundayandIcantgettomyfiles">It isn't Sunday and I can't get to my files</h3>
 <p>
-There may be a non-scheduled AFS outage. Check <a href="http://3down.mit.edu">3down</a>, hopefully it will be back up soon :-(. You can check up on the AFS servers by running <tt>fs checkservers</tt> (or <tt>fs checks</tt>). If there is no reported outage and you can't access the AFS servers (but can access the rest of the net), contact <a href="http://ist.mit.edu/services/athena/olh">OLC</a>.
+There may be a non-scheduled AFS outage. Check <a href="https://3down.mit.edu">3down</a>, hopefully it will be back up soon :-(. You can check up on the AFS servers by running <tt>fs checkservers</tt> (or <tt>fs checks</tt>). If there is no reported outage and you can't access the AFS servers (but can access the rest of the net), contact <a href="https://ist.mit.edu/services/athena/olh">OLC</a>.
 </p>
 <h2 id="AdvancedTasks">Advanced Tasks</h2>
 <h2 id="PuttingSoftwareinaLocker">Putting Software in a Locker</h2>
@@ -326,7 +319,7 @@ While it is easily possible to make an AFS group for yourself, it is harder to g
 </p>
 
 <h2 id="Findouttechnicalinformationaboutmylocker">Find out technical information about my locker</h2>
-<p>Figure out the volume name of the locker. One way to do this is to run <tt>fs lq .</tt> in the directory and look in the left column. Once you have the volume name, run <tt>vos examine &lt;volume name&gt;</tt>. This will tell you information such as what server it is located on, its ID numbers, when it was last accessed, when it was last backed up, etc. For example:
+<p>Figure out the volume name of the locker. One way to do this is to run <tt>fs listquota .</tt> in the directory and look in the left column. Once you have the volume name, run <tt>vos examine &lt;volume name&gt;</tt>. This will tell you information such as what server it is located on, its ID numbers, when it was last accessed, when it was last backed up, etc. For example:
 <pre>
 $ vos examine user.sipbtest
 user.sipbtest                     537058147 RW      69785 K  On-line
@@ -348,6 +341,6 @@ user.sipbtest                     537058147 RW      69785 K  On-line
 </p>
    
 <h2 id="SeeAlso">See  Also</h2>   
-<p>SIPB's older guide, <a href="http://stuff.mit.edu/afs/sipb.mit.edu/project/doc/afs/html/afs-new.html">Inessential AFS</a>  <br /> OpenAFS documentation  at <a href="http://www.openafs.org/">http://www.openafs.org/</a>
+<p>SIPB's older guide, <a href="https://stuff.mit.edu/afs/sipb.mit.edu/project/doc/afs/html/afs-new.html">Inessential AFS</a>  <br /> OpenAFS documentation  at <a href="https://www.openafs.org/">https://www.openafs.org/</a>
 </p>