Find the answer to your Linux question:
Results 1 to 5 of 5
If I: chmod 740 Documents/ Documents/ = drwxr----- If I: chmod 750 Documents/ Documents/ = drwxr-x--- How does that work? I want to achieve drwxrw----...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Banned
    Join Date
    Aug 2011
    Posts
    43

    chmod drama


    If I:
    chmod 740 Documents/
    Documents/ = drwxr-----

    If I:
    chmod 750 Documents/
    Documents/ = drwxr-x---

    How does that work?

    I want to achieve drwxrw----

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    First digit is for User, second is for Group and third is for Others.
    Following is access rights for each digit.
    Code:
    7     full
    6     read and write
    5     read and execute
    4     read only
    3     write and execute
    2     write only
    1     execute only
    0     none
    750 means : 7 - full access (rwx) to User, 5 - read and execute (r-x) access to Group and 0 - no access (---) to Others.
    Try to decipher 740 yourself.

    I would suggest you to check manual of chmod command.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Banned
    Join Date
    Aug 2011
    Posts
    43
    From my experience, Linux manuals are written to cater for the womanless losers that have spent half their life on SourceForge. I am not one of those users, so I like things explained simple.
    Your explanation did exactly that, far better than the manual could do for me, hence why I come to forums for help.

    Thanks!

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    so I like things explained simple.
    Check Linuxcommand.org. Its one of the best site for basic linux commands, imho.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Oct 2011
    Posts
    22
    Code:
    $ ls -l 
    drwxr-xr-x
    the permission are writed on 10 characters
    ----------
    1/
    d = directory
    - = regular file
    l = symbolic link
    s = Unix domain socket
    p = named pipe
    c = character device file
    b = block device file

    2/ (read for owner) [2^2=4]
    r = read permission
    - = no permission
    3/(write for owner)[2^1=2]
    w = write permission
    - = no permission
    4/(execute for owner)[2^0=1]
    x = execute permission
    - = no permission
    5/(read for group) [2^2=4]
    r = read permission
    - = no permission
    6/(write for group) [2^1=2]
    w = write permission
    - = no permission
    7/(execute for group) [2^0=1]
    x = execute permission
    - = no permission
    8/(read for others) [2^2=4]
    r = read permission
    - = no permission
    9/(write for others) [2^1=2]
    w = write permission
    - = no permission
    10/(execute for others) [2^0=1]
    x = execute permission
    - = no permission

    ===>
    drwxr-xr-x == 755

Posting Permissions

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