Managing permissions (AEN 4.2.0)
================================

.. raw:: html

    <p>This page explains the admin commands used to manage user permissions.</p>
    <div class="section" id="checking-file-ownership">
    <h2>Checking file ownership<a class="headerlink" href="#checking-file-ownership" title="Permalink to this headline">¶</a></h2>
    <p>To verify that all files in the <code class="docutils literal"><span class="pre">/opt/wakari/anaconda</span></code> directory are owned
    by the <code class="docutils literal"><span class="pre">wakari</span></code> user or group:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>root@server <span class="c1"># find /opt/wakari/anaconda \! -user wakari -print</span>
    root@server <span class="c1"># find /opt/wakari/anaconda \! -group wakari -print</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="fixing-file-ownership-settings">
    <h2>Fixing file ownership settings<a class="headerlink" href="#fixing-file-ownership-settings" title="Permalink to this headline">¶</a></h2>
    <p>To fix the ownership settings of any files that are listed in the output:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>chown -R wakari:wakari /opt/wakari/anaconda
    </pre></div>
    </div>
    </div>
    <div class="section" id="setting-a-file-owner-and-permissions">
    <h2>Setting a file owner and permissions<a class="headerlink" href="#setting-a-file-owner-and-permissions" title="Permalink to this headline">¶</a></h2>
    <p>To set a file owner and set its permissions:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>chown wakari:wakari /opt/wakari/wakari-server/bin/wk-*
    chmod <span class="m">700</span> /opt/wakari/wakari-server/bin/wk-*
    </pre></div>
    </div>
    </div>
    <div class="section" id="verifying-that-posix-acls-are-enabled">
    <h2>Verifying that POSIX ACLs are enabled<a class="headerlink" href="#verifying-that-posix-acls-are-enabled" title="Permalink to this headline">¶</a></h2>
    <p>The <code class="docutils literal"><span class="pre">acl</span></code> option must be enabled on the file system that contains the project
    root directory.</p>
    <p>NOTE: By default, the project root directory is <code class="docutils literal"><span class="pre">/projects</span></code>.</p>
    <p>To determine the project root directory where a custom <code class="docutils literal"><span class="pre">projectRoot</span></code> is
    configured:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>root@compute <span class="c1"># grep projectRoot /opt/wakari/wakari-compute/etc/wakari/config.json</span>
    </pre></div>
    </div>
    <p>The <code class="docutils literal"><span class="pre">mount</span></code> options or default options listed by <code class="docutils literal"><span class="pre">tune2fs</span></code> should
    indicate that the <code class="docutils literal"><span class="pre">acl</span></code> option is enabled.</p>
    <p>EXAMPLE:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>root@compute <span class="c1"># fs=`df /projects | tail -1 | cut -d &quot; &quot; -f 1`</span>
    root@compute <span class="c1"># mount | grep $fs</span>
    /dev/vda on / <span class="nb">type</span> ext4 <span class="o">(</span>rw<span class="o">)</span>
    root@compute <span class="c1"># tune2fs -l $fs | grep options</span>
    Default mount options:    user_xattr acl
    </pre></div>
    </div>
    </div>
