File Permissions - chmod

Discussion in 'Beginner Tutorials' started by Rob, Jul 9, 2013.

  1. Saptarshi Nag

    Saptarshi Nag Member

    Messages:
    42
    Likes Received:
    28
    Trophy Points:
    18
    the link says it all! :)

  2. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,355
    Likes Received:
    1,084
    Trophy Points:
    113
    I hope that helps. Explaining to people how a folder is executable is hard to explain.
    Saptarshi Nag and Haider92 like this.
  3. hindu tadakamalla

    hindu tadakamalla New Member

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    1
    thank u..u made it very simple for me
    DevynCJohnson likes this.
  4. plotozoidz

    plotozoidz New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    stat

    If you want a bit more information than ls -l file/directory provides, you can use the command stat. Lets say i have a file called file1.txt:

    Code:
    ls -l file1.txt
    outputs:
    -rw-r--r-- 1 username username 71 Mar 24 20:45 file1.txt

    Code:
    stat file1.txt
    outputs:
    File: `file1.txt'
    Size: 71 Blocks: 24 IO Block: 4096 regular file
    Device: 14h/20d Inode: 6029568 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1000/username) Gid: ( 1000/username)
    Access: 2014-03-24 21:37:49.826768784 +0000
    Modify: 2014-03-24 21:50:23.618789336 +0000
    Change: 2014-03-24 21:50:23.618789336 +0000
    Birth: -

    As you can see stat gives more detail, including the numeric 'chmod' value: 0644
    Handy if you want to check the corresponding numeric value permission of a file or directory!
    Last edited: Mar 24, 2014
  5. Arvind Kumar Singh

    Arvind Kumar Singh New Member

    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    1
    Hi,

    I wanted to know if we can check when the permission of a directory got changed in Linux?
    DevynCJohnson likes this.
  6. Saptarshi Nag

    Saptarshi Nag Member

    Messages:
    42
    Likes Received:
    28
    Trophy Points:
    18
    By ls -l directory_name , you can check permission of directory.
    DevynCJohnson likes this.
  7. Arvind Kumar Singh

    Arvind Kumar Singh New Member

    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    1
    Thanks!! but I want to know the time the directory permissions got changed.
  8. Saptarshi Nag

    Saptarshi Nag Member

    Messages:
    42
    Likes Received:
    28
    Trophy Points:
    18
    You can see the bash history with time stamp by the following command
    HISTTIMEFORMAT="%d/%m/%y %T "
    and then type 'history'

    To see your modifications you can use grep.
    That is,
    history | grep directory_name
    Now you can see all the modifications made through terminal.
  9. Arvind Kumar Singh

    Arvind Kumar Singh New Member

    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    1
    Thanks Saptarshi
  10. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,355
    Likes Received:
    1,084
    Trophy Points:
    113
    I love your answers. Thanks!
    Saptarshi Nag likes this.
  11. Saptarshi Nag

    Saptarshi Nag Member

    Messages:
    42
    Likes Received:
    28
    Trophy Points:
    18
    You all are welcome :)
  12. Rupam Das

    Rupam Das New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am using Ubuntu and Windows 7 on a same machine. Just install Ubuntu on your Windows OS. You will see dual boot option at the time of startup.

    ps: You can install both OS in same directory :)
  13. sudlin

    sudlin New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi Rob, really good explanation. I liked it...

Share This Page