Results 1 to 2 of 2

Thread: Reading permissions

  1. #1

    Wink Reading permissions

    This is a simple tutorial for any newbie to the asus Wl-700 community

    How to read permissions on a Linux system
    You will find as you dabble with the linux system a confusion of numbers assigned to change permissions and then the permissions write out in the form rwx rwx rwx owner user etc.....

    Assignment values are 4 for read, 2 for write and 1 for execute.

    so if you wanted to only have the user of a file execute it
    the command you will use will be 700
    giving u rwx --- --- owner users filename as the out put.

    Below the make up of assigned numbers and then use the chmod command

    rwx rwx rwx
    4+2+1 4+2+1 4+2+1
    7 7 7



  2. #2
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    9

    Post Better (?) would be

    Personally I prefer NOT to use the XXX (e.g. 755) syntax, as you might overwrite permission flags that already were fine as they were... Besides calculation failures might happen..

    The chmod command allows you to use a (from my point if view) better syntax which allows better reading and setting delta's (see the examples below for more clarity)

    chmod [who][operator][permission] file/directory
    (More syntaxes are possible but I wanted to keep it "simple" at first)

    Who:
    u User
    g Group
    o Other
    a All

    Operator:
    - Take away permissions
    + Add permissions
    = Assign permissions absolutely

    Permission:
    r read permission
    w write permission
    x execute permission
    (And the special permissions that need a bit more knowledge:
    l mandatory locking
    s user or group set-ID
    t sticky bit
    X execute permission if the file is a directory or if there is execute
    permission for one of the other user classes)

    So if you want to give your mp3 files a read permission for the user (owner) without changing the other permissions you would do something like:
    chmod u+r *.mp3

    To remove write for Other:
    chmod o-w *.mp3

    To remote read/write/execute for other:
    chmod o-rwx *.mp3

    To add read/write for user/group and add read for other:
    chmod ug+rw,o+r *.mp3

    To SET (removes permissions when not in set) read/write for user/group and read for other:
    chmod ug=rw,o=r *.mp3

    For clarity, a chmod 770 would be:
    chmod ug=rwx,o= *.mp3

    and a cgmod 775 would be:
    chmod ug=rwx,o=rx *.mp3

    BETTER would be the following, as an execute bit on the mp3 doesn't make sense and it would only set the execute when it's a directory or already have it:
    chmod ug=rwX,o=rX *.mp3

    How this doesn't confuse some people, but calculating bits... I find it old fashioned!

    Anyway, there is always the man page (man chmod) which will help too!!

Similar Threads

  1. Печать больших документов, error -71 reading printer status
    By Chabster in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 5
    Last Post: 15-02-2008, 10:45
  2. Can't change USB-HDD folder permissions
    By jjpujante in forum WL-500gP Q&A
    Replies: 0
    Last Post: 26-07-2007, 16:04
  3. Permissions problem?
    By Compressor in forum WL-500g Q&A
    Replies: 3
    Last Post: 30-05-2007, 08:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •