How-to Set-Change Ownership on Files and Directories by the Command Line on Debian 7 Wheezy Linux

October 17th, 2014 by thelinuxevangelist

Debian Linux Setting Ownership on File System



The Linux Tutorial Shows You Step-by-step How-to Setup or Change the Ownership over Files and Directories on Debian 7 Wheezy Linux.

The Ownership Decide How is the Owner of Files and Directories on the Debian Linux File System.

To Set the Ownership Over Files and Directories is the First Step in Setting Up Permissions and so Establish a Control and Security over the System.

To Follow the Tutorial You will Need to have a Little Practice to Work on the Debian Linux Console Terminal Command Line.

Setting Ownership on Debian 7 File System - Featured
  1. First Open a Command Line Terminal Console Window
    Cmd/Win & Search for “term”
    (Press “Enter” to Execute Commands)

    Gnome:
    Linux Command Line Console Terminal Quick-Start for Debian - Debian Gnome3 Open Terminal
    KDE:
    Debian 7 Wheezy Command Line Quick-Start - Debian KDE Open Terminal
    Lxde:
    Getting-Started with Command Line Console on Debian Wheezy 7 - Debian Lxde Open Terminal
    Xfce:
    Getting-Started Command Line Terminal for Debian Linux 7 Wheezy - Debian Xfce Open Terminal

    Or Login into Server Shell…

  2. How-to Quick-Start with Command Line on Debian:

    Debian Console Quick-Start
  3. Who Can Set/Change the Ownership?

    Only the Administrators or a Super-User Can Change a File/Directory Ownership!

  4. How to Set/Change the Ownership?

    • To Set/Change Ownership Over a Single File/Directory:

      su -c "chown myUser:myGroup myEntity"

      For Instance:

      mkdir -p $HOME/hello/world

      Now to Give the ‘world’ Directory to the ‘root’ User do:

      su -c "chown root:root $HOME/hello/world"

      Checking Ownership:

      ls -l $HOME/hello
    • To Set/Change Permissions Recursively Over a Directory and it’s Content (Subdirectories and Files):

      su -c "chown -R myUser:myGroup myEntity"

      For Instance:

      su -c "touch $HOME/hello/world/happy"

      Checking Ownership:

      ls -l $HOME/hello $$ ls -l $HOME/hello/world

      Now to Get Back the ‘world’ Directory with the ‘happy’ File:)

      su -c "chown -R myUser:myUser $HOME/hello/world"

      Check Ownership like Above…

  5. How-to Set Permissions on Debian File System:

    Debian Permissions Quick-Start
Share on Tumblr

Tags: , , , , , , , , , , , , , , , , , ,


Comments are disabled