changing attributes of Windows programs from Linux

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











up vote
0
down vote

favorite












How can I handle the attributes (read, write, hidden ...) of an executable program of Windows (*.exe) from the Linux terminal (command line)?



thanks in advance



Update:



For further clarification, suppose I have a hidden executable in Windows (NTFS). Start with a Linux LiveCD, mount NTFS partition and I want to remove the attributes of the read and hidden executable (.exe). (just an example)







share|improve this question





















  • On what filesystem?
    – Ignacio Vazquez-Abrams
    Jun 13 at 15:39










  • NTFS / Fat32 / ext4
    – user4839775
    Jun 13 at 15:47














up vote
0
down vote

favorite












How can I handle the attributes (read, write, hidden ...) of an executable program of Windows (*.exe) from the Linux terminal (command line)?



thanks in advance



Update:



For further clarification, suppose I have a hidden executable in Windows (NTFS). Start with a Linux LiveCD, mount NTFS partition and I want to remove the attributes of the read and hidden executable (.exe). (just an example)







share|improve this question





















  • On what filesystem?
    – Ignacio Vazquez-Abrams
    Jun 13 at 15:39










  • NTFS / Fat32 / ext4
    – user4839775
    Jun 13 at 15:47












up vote
0
down vote

favorite









up vote
0
down vote

favorite











How can I handle the attributes (read, write, hidden ...) of an executable program of Windows (*.exe) from the Linux terminal (command line)?



thanks in advance



Update:



For further clarification, suppose I have a hidden executable in Windows (NTFS). Start with a Linux LiveCD, mount NTFS partition and I want to remove the attributes of the read and hidden executable (.exe). (just an example)







share|improve this question













How can I handle the attributes (read, write, hidden ...) of an executable program of Windows (*.exe) from the Linux terminal (command line)?



thanks in advance



Update:



For further clarification, suppose I have a hidden executable in Windows (NTFS). Start with a Linux LiveCD, mount NTFS partition and I want to remove the attributes of the read and hidden executable (.exe). (just an example)









share|improve this question












share|improve this question




share|improve this question








edited Jun 13 at 15:50
























asked Jun 13 at 15:37









user4839775

9110




9110











  • On what filesystem?
    – Ignacio Vazquez-Abrams
    Jun 13 at 15:39










  • NTFS / Fat32 / ext4
    – user4839775
    Jun 13 at 15:47
















  • On what filesystem?
    – Ignacio Vazquez-Abrams
    Jun 13 at 15:39










  • NTFS / Fat32 / ext4
    – user4839775
    Jun 13 at 15:47















On what filesystem?
– Ignacio Vazquez-Abrams
Jun 13 at 15:39




On what filesystem?
– Ignacio Vazquez-Abrams
Jun 13 at 15:39












NTFS / Fat32 / ext4
– user4839775
Jun 13 at 15:47




NTFS / Fat32 / ext4
– user4839775
Jun 13 at 15:47










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










When the filesystem is mounted with NTFS-3G, the setfattr command should let you change extended attributes, which are stored in system.ntfs_attrib_be.



First, query the existing attributes with getfattr:



$ getfattr -n system.ntfs_attrib_be -e hex file.txt
# file: file.txt
system.ntfs_attrib_be=0x00000022


Then set the new value, removing the one(s) you don't want. According to https://msdn.microsoft.com/en-us/library/cc246322.aspx , ATTR_HIDDEN = 0x2, ATTR_ARCHIVE = 0x20. So to remove only the Hidden bit:



setfattr -n system.ntfs_attrib_be -v 0x00000020 file.txt


There is a wrapper script called ntfs_attr.sh that may simplify this.






share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f449581%2fchanging-attributes-of-windows-programs-from-linux%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    When the filesystem is mounted with NTFS-3G, the setfattr command should let you change extended attributes, which are stored in system.ntfs_attrib_be.



    First, query the existing attributes with getfattr:



    $ getfattr -n system.ntfs_attrib_be -e hex file.txt
    # file: file.txt
    system.ntfs_attrib_be=0x00000022


    Then set the new value, removing the one(s) you don't want. According to https://msdn.microsoft.com/en-us/library/cc246322.aspx , ATTR_HIDDEN = 0x2, ATTR_ARCHIVE = 0x20. So to remove only the Hidden bit:



    setfattr -n system.ntfs_attrib_be -v 0x00000020 file.txt


    There is a wrapper script called ntfs_attr.sh that may simplify this.






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      When the filesystem is mounted with NTFS-3G, the setfattr command should let you change extended attributes, which are stored in system.ntfs_attrib_be.



      First, query the existing attributes with getfattr:



      $ getfattr -n system.ntfs_attrib_be -e hex file.txt
      # file: file.txt
      system.ntfs_attrib_be=0x00000022


      Then set the new value, removing the one(s) you don't want. According to https://msdn.microsoft.com/en-us/library/cc246322.aspx , ATTR_HIDDEN = 0x2, ATTR_ARCHIVE = 0x20. So to remove only the Hidden bit:



      setfattr -n system.ntfs_attrib_be -v 0x00000020 file.txt


      There is a wrapper script called ntfs_attr.sh that may simplify this.






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        When the filesystem is mounted with NTFS-3G, the setfattr command should let you change extended attributes, which are stored in system.ntfs_attrib_be.



        First, query the existing attributes with getfattr:



        $ getfattr -n system.ntfs_attrib_be -e hex file.txt
        # file: file.txt
        system.ntfs_attrib_be=0x00000022


        Then set the new value, removing the one(s) you don't want. According to https://msdn.microsoft.com/en-us/library/cc246322.aspx , ATTR_HIDDEN = 0x2, ATTR_ARCHIVE = 0x20. So to remove only the Hidden bit:



        setfattr -n system.ntfs_attrib_be -v 0x00000020 file.txt


        There is a wrapper script called ntfs_attr.sh that may simplify this.






        share|improve this answer













        When the filesystem is mounted with NTFS-3G, the setfattr command should let you change extended attributes, which are stored in system.ntfs_attrib_be.



        First, query the existing attributes with getfattr:



        $ getfattr -n system.ntfs_attrib_be -e hex file.txt
        # file: file.txt
        system.ntfs_attrib_be=0x00000022


        Then set the new value, removing the one(s) you don't want. According to https://msdn.microsoft.com/en-us/library/cc246322.aspx , ATTR_HIDDEN = 0x2, ATTR_ARCHIVE = 0x20. So to remove only the Hidden bit:



        setfattr -n system.ntfs_attrib_be -v 0x00000020 file.txt


        There is a wrapper script called ntfs_attr.sh that may simplify this.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 13 at 17:27









        JigglyNaga

        2,556623




        2,556623






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449581%2fchanging-attributes-of-windows-programs-from-linux%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay