Skip to main content
Chemistry LibreTexts

10: User Management

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    File Permissions

    Now, let's check the permissions that each directory and file has in our test directory.

    In Linux, the users (user, group, others) have specific permissions defined. These permissions are denoted using the following characters:

    r (Read): This allows the user to open and read the file content. But does not give the possibility of editing or modifying the file.

    w (Write): This allows the user to edit, rename and remove the file. 

    x (Execute): This allows the user to run and execute the program. 

    Be careful

    If a file has write permissions but is present in a directory that does not have write permissions, you can edit the file content but can't rename or remove it.


    Viewing file permissions

    To view file permissions, use the command:

    • ls   -l : (l = long format)
    ls -l



    In the output above, the list of characters shows the setting of the permissions:

    The first three characters show the user permissions

    The middle three characters show the group permissions

    The last three characters show the other permissions

    The first character of each output line represents the type of entry that is being listed.

    - (dash): the entry is a file

    d: the entry is a directory


    --- : means that no permissions are granted

    rwx : means that all permissions are granted


    Changing file permissions

    To change file permissions on one of our test files, use the command:

    • chmod

    For the use of this command, three things need to be set:

    Who we are setting permissions to:

    u : owner of the file
    g : the file group
    o : everyone who is not an owner
    a : everyone

    How we are setting the permissions:

    + : turns on a permission
    - : turns off a permission
    = : ignores current permissions and sets  new on

    What we are setting them to:

    r : read
    w : write
    x : execute
    X : special execute for folders


    Now let's grant execute permissions to the user of one of our test files: 

    chmod u+x test_file_2.txt


    This page titled 10: User Management is shared under a not declared license and was authored, remixed, and/or curated by Robert Belford.

    • Was this article helpful?