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

October 17th, 2014 by thelinuxevangelist

Debian Linux Setting Permissions on Debian Linux




The Linux Tutorial Shows You Step-by-step How-to Set or Change the File/Directory Permissions on Debian 7 Wheezy Linux.

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

Included in the Article Links to Guides on Getting-Started with Command Line on Debian Linux and to Setting Ownership over Debian File System.

Set/Change Files and Directories Permissions on Debian 7 Wheezy Linux Command Line - Featured
  1. First Open a Command Line Terminal Console Window
    Cmd/Win & Search for “term”
    (Press “Enter” to Execute Commands)

    Gnome:
    Setu Permissions on Command Line Console Terminal Quick-Start for Debian - Debian Gnome3 Open Terminal
    KDE:
    Debian 7 Wheezy Set Permissions Command Line Quick-Start - Debian KDE Open Terminal
    Lxde:
    Getting-Started with Command Line Console Setting Permissions on Debian Wheezy 7 - Debian Lxde Open Terminal
    Xfce:
    Getting-Started Command Line Terminal Changing Permissions 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 Change File’s Permissions?

    • You Can Freely Change Permissions over Files/Directories Your User’s Hold.
    • But you need Admin Super User Powers to Change Permissions on Entities he Do Not Hold!
  4. Setting Up Permissions on Files and Directories

      Basic Building Blocks for the Permission Command

      Ownership Types:

      • Use ‘u‘ to Setup Permissions for the User Owner
      • Use ‘g‘ to Setup Permissions for the Group Owner
      • Use ‘u+g‘ to Setup Permissions for the User and Group Owner
      • Use ‘a‘ to Setup Permissions for All (World)
      • Use ‘o‘ for Revoking Actual Permissions and Giving Permissions to the Others (the Before Disabled ones)

      Permission Types:

      • Use ‘x‘ to Setup Execution Permission
      • Use ‘w‘ to Setup Write/Delete Permission
      • Use ‘r‘ to Setup Read Permission

      Giving/Removing Permissions:

      • Use ‘+‘ to Give Permission
      • Use ‘‘ to Remove Permission

    Generic Permission Command Form:

    chmod ownershipSubject[+/-]r/w/x [myEntity]

    For Instance :

    mkdir $HOME/world

    To Give ‘All’ (read,write/delete,execute) Permissions on the ‘world’ Directory to ‘Everybody’:

    chmod a+rwx $HOME/world

    (Normally Take Care Before to Open a Directory to the World Because this Can Compromise Your System Security!)
    Now to Check Permissions Setup:

    ls -l $HOME

    To Remove the ‘Write/Delete’ Permission to the ‘World’:

    chmod a-w $HOME/world

    To Give the ‘Write/Delete’ Permission the ‘world’ Only to the Owner:

    chmod u+w $HOME/world

    To Give the ‘Write/Delete’ Permission the ‘world’ Also to the Owner’s Group:

    chmod g+w $HOME/world

    To Remove the ‘Execution’ Permission to the ‘World’:

    chmod a-x $HOME/world

    To Give the ‘Execution’ Permission to the ‘world’ to the Owner:

    chmod u+x $HOME/world

    To Give the ‘Execution’ Permission to the ‘world’ Also to the Owner’s Group:

    chmod g+x $HOME/world

    (After Only You and Your Group will be Able to Access the ‘world’ Directory Directory on Shell!)

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

    Debian Setting Ownership Quick-Start

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