How to repair broken permissions on files in /usr/share/mime?

Multi tool use
Multi tool use












0















Sometimes on Void Linux, GDK will get into a broken state due to bad permissions on files in /usr/share/mime.



Any GTK applications will have an error like:



(evince:14593): Gtk-WARNING **: 11:32:26.476: Could not load a pixbuf from icon theme.

This may indicate that pixbuf loaders or the mime database could not be found.


The bad permissions typically look like (notice all the files have a mode of 640):



-rw-r----- 1 root root  10773 Mar  1 13:37 aliases
drwxr-xr-x 1 root root 17650 Mar 1 13:37 application/
drwxr-xr-x 1 root root 1264 Mar 1 13:37 audio/
drwxr-xr-x 1 root root 72 Mar 1 13:37 font/
-rw-r----- 1 root root 21733 Mar 1 13:37 generic-icons
-rw-r----- 1 root root 31371 Mar 1 13:37 globs
-rw-r----- 1 root root 34843 Mar 1 13:37 globs2
-rw-r----- 1 root root 20 Mar 1 13:37 icons
drwxr-xr-x 1 root root 2474 Mar 1 13:37 image/
drwxr-xr-x 1 root root 5868 Mar 1 13:37 inode/
-rw-r----- 1 root root 28142 Mar 1 13:37 magic
drwxr-xr-x 1 root root 216 Mar 1 13:37 message/
-rw-r----- 1 root root 147456 Mar 1 13:37 mime.cache
drwxr-xr-x 1 root root 46 Mar 1 13:37 model/
drwxr-xr-x 1 root root 224 Mar 1 13:37 multipart/
drwxr-xr-x 1 root root 136 Mar 1 13:37 packages/
-rw-r----- 1 root root 17811 Mar 1 13:37 subclasses
drwxr-xr-x 1 root root 3220 Mar 1 13:37 text/
-rw-r----- 1 root root 964 Mar 1 13:37 treemagic
-rw-r----- 1 root root 21842 Mar 1 13:37 types
-rw-r----- 1 root root 5 Mar 1 13:37 version
drwxr-xr-x 1 root root 688 Mar 1 13:37 video/
drwxr-xr-x 1 root root 522 Mar 1 13:37 x-content/
drwxr-xr-x 1 root root 28 Mar 1 13:37 x-epoc/
-rw-r----- 1 root root 1775 Mar 1 13:37 XMLnamespaces


To fix the situation, the permissions must be fixed, and then the mime database and gdk pixbuf cache must be regenerated.



What is the best way to repair the permissions so that the files are 644?










share|improve this question



























    0















    Sometimes on Void Linux, GDK will get into a broken state due to bad permissions on files in /usr/share/mime.



    Any GTK applications will have an error like:



    (evince:14593): Gtk-WARNING **: 11:32:26.476: Could not load a pixbuf from icon theme.

    This may indicate that pixbuf loaders or the mime database could not be found.


    The bad permissions typically look like (notice all the files have a mode of 640):



    -rw-r----- 1 root root  10773 Mar  1 13:37 aliases
    drwxr-xr-x 1 root root 17650 Mar 1 13:37 application/
    drwxr-xr-x 1 root root 1264 Mar 1 13:37 audio/
    drwxr-xr-x 1 root root 72 Mar 1 13:37 font/
    -rw-r----- 1 root root 21733 Mar 1 13:37 generic-icons
    -rw-r----- 1 root root 31371 Mar 1 13:37 globs
    -rw-r----- 1 root root 34843 Mar 1 13:37 globs2
    -rw-r----- 1 root root 20 Mar 1 13:37 icons
    drwxr-xr-x 1 root root 2474 Mar 1 13:37 image/
    drwxr-xr-x 1 root root 5868 Mar 1 13:37 inode/
    -rw-r----- 1 root root 28142 Mar 1 13:37 magic
    drwxr-xr-x 1 root root 216 Mar 1 13:37 message/
    -rw-r----- 1 root root 147456 Mar 1 13:37 mime.cache
    drwxr-xr-x 1 root root 46 Mar 1 13:37 model/
    drwxr-xr-x 1 root root 224 Mar 1 13:37 multipart/
    drwxr-xr-x 1 root root 136 Mar 1 13:37 packages/
    -rw-r----- 1 root root 17811 Mar 1 13:37 subclasses
    drwxr-xr-x 1 root root 3220 Mar 1 13:37 text/
    -rw-r----- 1 root root 964 Mar 1 13:37 treemagic
    -rw-r----- 1 root root 21842 Mar 1 13:37 types
    -rw-r----- 1 root root 5 Mar 1 13:37 version
    drwxr-xr-x 1 root root 688 Mar 1 13:37 video/
    drwxr-xr-x 1 root root 522 Mar 1 13:37 x-content/
    drwxr-xr-x 1 root root 28 Mar 1 13:37 x-epoc/
    -rw-r----- 1 root root 1775 Mar 1 13:37 XMLnamespaces


    To fix the situation, the permissions must be fixed, and then the mime database and gdk pixbuf cache must be regenerated.



    What is the best way to repair the permissions so that the files are 644?










    share|improve this question

























      0












      0








      0








      Sometimes on Void Linux, GDK will get into a broken state due to bad permissions on files in /usr/share/mime.



      Any GTK applications will have an error like:



      (evince:14593): Gtk-WARNING **: 11:32:26.476: Could not load a pixbuf from icon theme.

      This may indicate that pixbuf loaders or the mime database could not be found.


      The bad permissions typically look like (notice all the files have a mode of 640):



      -rw-r----- 1 root root  10773 Mar  1 13:37 aliases
      drwxr-xr-x 1 root root 17650 Mar 1 13:37 application/
      drwxr-xr-x 1 root root 1264 Mar 1 13:37 audio/
      drwxr-xr-x 1 root root 72 Mar 1 13:37 font/
      -rw-r----- 1 root root 21733 Mar 1 13:37 generic-icons
      -rw-r----- 1 root root 31371 Mar 1 13:37 globs
      -rw-r----- 1 root root 34843 Mar 1 13:37 globs2
      -rw-r----- 1 root root 20 Mar 1 13:37 icons
      drwxr-xr-x 1 root root 2474 Mar 1 13:37 image/
      drwxr-xr-x 1 root root 5868 Mar 1 13:37 inode/
      -rw-r----- 1 root root 28142 Mar 1 13:37 magic
      drwxr-xr-x 1 root root 216 Mar 1 13:37 message/
      -rw-r----- 1 root root 147456 Mar 1 13:37 mime.cache
      drwxr-xr-x 1 root root 46 Mar 1 13:37 model/
      drwxr-xr-x 1 root root 224 Mar 1 13:37 multipart/
      drwxr-xr-x 1 root root 136 Mar 1 13:37 packages/
      -rw-r----- 1 root root 17811 Mar 1 13:37 subclasses
      drwxr-xr-x 1 root root 3220 Mar 1 13:37 text/
      -rw-r----- 1 root root 964 Mar 1 13:37 treemagic
      -rw-r----- 1 root root 21842 Mar 1 13:37 types
      -rw-r----- 1 root root 5 Mar 1 13:37 version
      drwxr-xr-x 1 root root 688 Mar 1 13:37 video/
      drwxr-xr-x 1 root root 522 Mar 1 13:37 x-content/
      drwxr-xr-x 1 root root 28 Mar 1 13:37 x-epoc/
      -rw-r----- 1 root root 1775 Mar 1 13:37 XMLnamespaces


      To fix the situation, the permissions must be fixed, and then the mime database and gdk pixbuf cache must be regenerated.



      What is the best way to repair the permissions so that the files are 644?










      share|improve this question














      Sometimes on Void Linux, GDK will get into a broken state due to bad permissions on files in /usr/share/mime.



      Any GTK applications will have an error like:



      (evince:14593): Gtk-WARNING **: 11:32:26.476: Could not load a pixbuf from icon theme.

      This may indicate that pixbuf loaders or the mime database could not be found.


      The bad permissions typically look like (notice all the files have a mode of 640):



      -rw-r----- 1 root root  10773 Mar  1 13:37 aliases
      drwxr-xr-x 1 root root 17650 Mar 1 13:37 application/
      drwxr-xr-x 1 root root 1264 Mar 1 13:37 audio/
      drwxr-xr-x 1 root root 72 Mar 1 13:37 font/
      -rw-r----- 1 root root 21733 Mar 1 13:37 generic-icons
      -rw-r----- 1 root root 31371 Mar 1 13:37 globs
      -rw-r----- 1 root root 34843 Mar 1 13:37 globs2
      -rw-r----- 1 root root 20 Mar 1 13:37 icons
      drwxr-xr-x 1 root root 2474 Mar 1 13:37 image/
      drwxr-xr-x 1 root root 5868 Mar 1 13:37 inode/
      -rw-r----- 1 root root 28142 Mar 1 13:37 magic
      drwxr-xr-x 1 root root 216 Mar 1 13:37 message/
      -rw-r----- 1 root root 147456 Mar 1 13:37 mime.cache
      drwxr-xr-x 1 root root 46 Mar 1 13:37 model/
      drwxr-xr-x 1 root root 224 Mar 1 13:37 multipart/
      drwxr-xr-x 1 root root 136 Mar 1 13:37 packages/
      -rw-r----- 1 root root 17811 Mar 1 13:37 subclasses
      drwxr-xr-x 1 root root 3220 Mar 1 13:37 text/
      -rw-r----- 1 root root 964 Mar 1 13:37 treemagic
      -rw-r----- 1 root root 21842 Mar 1 13:37 types
      -rw-r----- 1 root root 5 Mar 1 13:37 version
      drwxr-xr-x 1 root root 688 Mar 1 13:37 video/
      drwxr-xr-x 1 root root 522 Mar 1 13:37 x-content/
      drwxr-xr-x 1 root root 28 Mar 1 13:37 x-epoc/
      -rw-r----- 1 root root 1775 Mar 1 13:37 XMLnamespaces


      To fix the situation, the permissions must be fixed, and then the mime database and gdk pixbuf cache must be regenerated.



      What is the best way to repair the permissions so that the files are 644?







      void-linux






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      CameronNemoCameronNemo

      1,063812




      1,063812






















          2 Answers
          2






          active

          oldest

          votes


















          0














          To change all files in /usr/share/mime and below (without directories) with permission 640 to 644, you could run



          find /usr/share/mime -type f -perm 640 -exec chmod 644 {} ;




          • find /usr/share/mime find files in /usr/share/mime


          • -type f restrict to regular files (non-directories)


          • -perm 640 and restrict find to files with permission 640


          • -exec chmod 644 {} ; executes chmod 644 on the files found






          share|improve this answer

































            0














            An alternative way to accomplish this specific permissions issue is to regenerate the mime database with the correct umask:



            $ sudo sh
            # umask 022
            # update-mime-database /usr/share/mime
            # exit





            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',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              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%2f505063%2fhow-to-repair-broken-permissions-on-files-in-usr-share-mime%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              To change all files in /usr/share/mime and below (without directories) with permission 640 to 644, you could run



              find /usr/share/mime -type f -perm 640 -exec chmod 644 {} ;




              • find /usr/share/mime find files in /usr/share/mime


              • -type f restrict to regular files (non-directories)


              • -perm 640 and restrict find to files with permission 640


              • -exec chmod 644 {} ; executes chmod 644 on the files found






              share|improve this answer






























                0














                To change all files in /usr/share/mime and below (without directories) with permission 640 to 644, you could run



                find /usr/share/mime -type f -perm 640 -exec chmod 644 {} ;




                • find /usr/share/mime find files in /usr/share/mime


                • -type f restrict to regular files (non-directories)


                • -perm 640 and restrict find to files with permission 640


                • -exec chmod 644 {} ; executes chmod 644 on the files found






                share|improve this answer




























                  0












                  0








                  0







                  To change all files in /usr/share/mime and below (without directories) with permission 640 to 644, you could run



                  find /usr/share/mime -type f -perm 640 -exec chmod 644 {} ;




                  • find /usr/share/mime find files in /usr/share/mime


                  • -type f restrict to regular files (non-directories)


                  • -perm 640 and restrict find to files with permission 640


                  • -exec chmod 644 {} ; executes chmod 644 on the files found






                  share|improve this answer















                  To change all files in /usr/share/mime and below (without directories) with permission 640 to 644, you could run



                  find /usr/share/mime -type f -perm 640 -exec chmod 644 {} ;




                  • find /usr/share/mime find files in /usr/share/mime


                  • -type f restrict to regular files (non-directories)


                  • -perm 640 and restrict find to files with permission 640


                  • -exec chmod 644 {} ; executes chmod 644 on the files found







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 1 hour ago

























                  answered 1 hour ago









                  FreddyFreddy

                  1,2899




                  1,2899

























                      0














                      An alternative way to accomplish this specific permissions issue is to regenerate the mime database with the correct umask:



                      $ sudo sh
                      # umask 022
                      # update-mime-database /usr/share/mime
                      # exit





                      share|improve this answer




























                        0














                        An alternative way to accomplish this specific permissions issue is to regenerate the mime database with the correct umask:



                        $ sudo sh
                        # umask 022
                        # update-mime-database /usr/share/mime
                        # exit





                        share|improve this answer


























                          0












                          0








                          0







                          An alternative way to accomplish this specific permissions issue is to regenerate the mime database with the correct umask:



                          $ sudo sh
                          # umask 022
                          # update-mime-database /usr/share/mime
                          # exit





                          share|improve this answer













                          An alternative way to accomplish this specific permissions issue is to regenerate the mime database with the correct umask:



                          $ sudo sh
                          # umask 022
                          # update-mime-database /usr/share/mime
                          # exit






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 39 mins ago









                          CameronNemoCameronNemo

                          1,063812




                          1,063812






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505063%2fhow-to-repair-broken-permissions-on-files-in-usr-share-mime%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              pBiJN 1Hs,AHyUd3jn iacXBLZE3rDVdtW4aOcSJMnji6lsP3eQFv7p 0
                              NyntTj8hr NC NyU4DX2PGa,UrQfBLt

                              Popular posts from this blog

                              Loup dans la culture

                              ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux

                              How to solve the problem of ntp “Unable to contact time server” from KDE?