What is the difference between chmod and chattr?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Solaris operating system does not have chattr, it uses chmod instead. Also on Windows. Because when you're changing attributes of a file you're changing what you or other users can do with it, thus the meaning of chmod.



So do we really need chattr? and how is it different to chmod?










share|improve this question

















  • 1




    "Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
    – Rinzwind
    Feb 16 at 10:36















up vote
0
down vote

favorite












Solaris operating system does not have chattr, it uses chmod instead. Also on Windows. Because when you're changing attributes of a file you're changing what you or other users can do with it, thus the meaning of chmod.



So do we really need chattr? and how is it different to chmod?










share|improve this question

















  • 1




    "Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
    – Rinzwind
    Feb 16 at 10:36













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Solaris operating system does not have chattr, it uses chmod instead. Also on Windows. Because when you're changing attributes of a file you're changing what you or other users can do with it, thus the meaning of chmod.



So do we really need chattr? and how is it different to chmod?










share|improve this question













Solaris operating system does not have chattr, it uses chmod instead. Also on Windows. Because when you're changing attributes of a file you're changing what you or other users can do with it, thus the meaning of chmod.



So do we really need chattr? and how is it different to chmod?







chmod






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 16 at 10:28









Shayan

195315




195315







  • 1




    "Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
    – Rinzwind
    Feb 16 at 10:36













  • 1




    "Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
    – Rinzwind
    Feb 16 at 10:36








1




1




"Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
– Rinzwind
Feb 16 at 10:36





"Solaris operating system does not have chattr, it uses chmod instead. Also on Windows." Not our problem ;) chattr is more powerful than chmod: chmod does not always have a method to set "immutable".
– Rinzwind
Feb 16 at 10:36











2 Answers
2






active

oldest

votes

















up vote
2
down vote













chmod reefers to file permissions for users, groups and others:



read

write

execute



chattr reefers to attributes regardless users or groups, some of the attributes are:



a --> Append only

i --> Inmutable

c --> File automatically compressed in kernel.



Take a look at wikipedia for chattr.






share|improve this answer




















  • chmod with -w is for removing write permissions
    – Alvaro Niño
    Feb 16 at 10:43










  • Oops removed it. Yes but not on solaris ;)
    – Rinzwind
    Feb 16 at 10:53

















up vote
1
down vote













At least because:



Not all flags are supported or utilized by all filesystems;


The second thing - this question is a kind of trilling, because there is no chattr (these bits like linux has support) in solaris.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006741%2fwhat-is-the-difference-between-chmod-and-chattr%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    chmod reefers to file permissions for users, groups and others:



    read

    write

    execute



    chattr reefers to attributes regardless users or groups, some of the attributes are:



    a --> Append only

    i --> Inmutable

    c --> File automatically compressed in kernel.



    Take a look at wikipedia for chattr.






    share|improve this answer




















    • chmod with -w is for removing write permissions
      – Alvaro Niño
      Feb 16 at 10:43










    • Oops removed it. Yes but not on solaris ;)
      – Rinzwind
      Feb 16 at 10:53














    up vote
    2
    down vote













    chmod reefers to file permissions for users, groups and others:



    read

    write

    execute



    chattr reefers to attributes regardless users or groups, some of the attributes are:



    a --> Append only

    i --> Inmutable

    c --> File automatically compressed in kernel.



    Take a look at wikipedia for chattr.






    share|improve this answer




















    • chmod with -w is for removing write permissions
      – Alvaro Niño
      Feb 16 at 10:43










    • Oops removed it. Yes but not on solaris ;)
      – Rinzwind
      Feb 16 at 10:53












    up vote
    2
    down vote










    up vote
    2
    down vote









    chmod reefers to file permissions for users, groups and others:



    read

    write

    execute



    chattr reefers to attributes regardless users or groups, some of the attributes are:



    a --> Append only

    i --> Inmutable

    c --> File automatically compressed in kernel.



    Take a look at wikipedia for chattr.






    share|improve this answer












    chmod reefers to file permissions for users, groups and others:



    read

    write

    execute



    chattr reefers to attributes regardless users or groups, some of the attributes are:



    a --> Append only

    i --> Inmutable

    c --> File automatically compressed in kernel.



    Take a look at wikipedia for chattr.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 16 at 10:39









    Alvaro Niño

    2337




    2337











    • chmod with -w is for removing write permissions
      – Alvaro Niño
      Feb 16 at 10:43










    • Oops removed it. Yes but not on solaris ;)
      – Rinzwind
      Feb 16 at 10:53
















    • chmod with -w is for removing write permissions
      – Alvaro Niño
      Feb 16 at 10:43










    • Oops removed it. Yes but not on solaris ;)
      – Rinzwind
      Feb 16 at 10:53















    chmod with -w is for removing write permissions
    – Alvaro Niño
    Feb 16 at 10:43




    chmod with -w is for removing write permissions
    – Alvaro Niño
    Feb 16 at 10:43












    Oops removed it. Yes but not on solaris ;)
    – Rinzwind
    Feb 16 at 10:53




    Oops removed it. Yes but not on solaris ;)
    – Rinzwind
    Feb 16 at 10:53












    up vote
    1
    down vote













    At least because:



    Not all flags are supported or utilized by all filesystems;


    The second thing - this question is a kind of trilling, because there is no chattr (these bits like linux has support) in solaris.






    share|improve this answer
























      up vote
      1
      down vote













      At least because:



      Not all flags are supported or utilized by all filesystems;


      The second thing - this question is a kind of trilling, because there is no chattr (these bits like linux has support) in solaris.






      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        At least because:



        Not all flags are supported or utilized by all filesystems;


        The second thing - this question is a kind of trilling, because there is no chattr (these bits like linux has support) in solaris.






        share|improve this answer












        At least because:



        Not all flags are supported or utilized by all filesystems;


        The second thing - this question is a kind of trilling, because there is no chattr (these bits like linux has support) in solaris.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 16 at 10:50









        L.Integra

        666




        666



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006741%2fwhat-is-the-difference-between-chmod-and-chattr%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491