Two dir's of identical ownership, but `cat > f` produces differently owned files











up vote
2
down vote

favorite












Why do myfile.txt and myotherfile.txt have different ownership?



The first directory, myhandle on my Desktop, was created using sudo chown. The second directory under /run/... was created as a networked file system by keybase.



From my ~/Desktop/myhandle:



$ ls -l ..
total 0
drwx------ 1 me root 126 Nov 23 23:10 myhandle

$ ls -la
total 0
drwx------ 1 me root 126 Nov 23 23:10 .
dr-x------ 1 me root 46 Nov 20 01:50 ..

$ cat > myfile.txt
test

$ ls -la
total 4
drwx------ 1 me root 146 Nov 23 23:11 .
dr-x------ 1 me root 46 Nov 20 01:50 ..
-rw-rw-r-- 1 me me 5 Nov 23 23:11 myfile.txt


From /run/user/1000/keybase/kbfs/private/myhandle



$ ls -l ..
total 1
drwx------ 1 me root 504 Nov 23 23:12 myhandle

$ ls -la
total 0

$ cat > myotherfile.txt
test

$ ls -la
total 1
-rw------- 1 me root 5 Nov 23 23:12 myotherfile.txt









share|improve this question


























    up vote
    2
    down vote

    favorite












    Why do myfile.txt and myotherfile.txt have different ownership?



    The first directory, myhandle on my Desktop, was created using sudo chown. The second directory under /run/... was created as a networked file system by keybase.



    From my ~/Desktop/myhandle:



    $ ls -l ..
    total 0
    drwx------ 1 me root 126 Nov 23 23:10 myhandle

    $ ls -la
    total 0
    drwx------ 1 me root 126 Nov 23 23:10 .
    dr-x------ 1 me root 46 Nov 20 01:50 ..

    $ cat > myfile.txt
    test

    $ ls -la
    total 4
    drwx------ 1 me root 146 Nov 23 23:11 .
    dr-x------ 1 me root 46 Nov 20 01:50 ..
    -rw-rw-r-- 1 me me 5 Nov 23 23:11 myfile.txt


    From /run/user/1000/keybase/kbfs/private/myhandle



    $ ls -l ..
    total 1
    drwx------ 1 me root 504 Nov 23 23:12 myhandle

    $ ls -la
    total 0

    $ cat > myotherfile.txt
    test

    $ ls -la
    total 1
    -rw------- 1 me root 5 Nov 23 23:12 myotherfile.txt









    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      Why do myfile.txt and myotherfile.txt have different ownership?



      The first directory, myhandle on my Desktop, was created using sudo chown. The second directory under /run/... was created as a networked file system by keybase.



      From my ~/Desktop/myhandle:



      $ ls -l ..
      total 0
      drwx------ 1 me root 126 Nov 23 23:10 myhandle

      $ ls -la
      total 0
      drwx------ 1 me root 126 Nov 23 23:10 .
      dr-x------ 1 me root 46 Nov 20 01:50 ..

      $ cat > myfile.txt
      test

      $ ls -la
      total 4
      drwx------ 1 me root 146 Nov 23 23:11 .
      dr-x------ 1 me root 46 Nov 20 01:50 ..
      -rw-rw-r-- 1 me me 5 Nov 23 23:11 myfile.txt


      From /run/user/1000/keybase/kbfs/private/myhandle



      $ ls -l ..
      total 1
      drwx------ 1 me root 504 Nov 23 23:12 myhandle

      $ ls -la
      total 0

      $ cat > myotherfile.txt
      test

      $ ls -la
      total 1
      -rw------- 1 me root 5 Nov 23 23:12 myotherfile.txt









      share|improve this question













      Why do myfile.txt and myotherfile.txt have different ownership?



      The first directory, myhandle on my Desktop, was created using sudo chown. The second directory under /run/... was created as a networked file system by keybase.



      From my ~/Desktop/myhandle:



      $ ls -l ..
      total 0
      drwx------ 1 me root 126 Nov 23 23:10 myhandle

      $ ls -la
      total 0
      drwx------ 1 me root 126 Nov 23 23:10 .
      dr-x------ 1 me root 46 Nov 20 01:50 ..

      $ cat > myfile.txt
      test

      $ ls -la
      total 4
      drwx------ 1 me root 146 Nov 23 23:11 .
      dr-x------ 1 me root 46 Nov 20 01:50 ..
      -rw-rw-r-- 1 me me 5 Nov 23 23:11 myfile.txt


      From /run/user/1000/keybase/kbfs/private/myhandle



      $ ls -l ..
      total 1
      drwx------ 1 me root 504 Nov 23 23:12 myhandle

      $ ls -la
      total 0

      $ cat > myotherfile.txt
      test

      $ ls -la
      total 1
      -rw------- 1 me root 5 Nov 23 23:12 myotherfile.txt






      file-permissions ubuntu-18.04 keybase






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 24 at 7:26









      Diagon

      431414




      431414






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          The path component kbfs sounds like its contents could be on another filesystem (kbfs is the name of the filesystem keybase uses).



          It is not unheard-of for special file systems to not adhere to common expectations about permissions.



          See also an old bug in keybase where, in its filesystem, it was reporting completely different permissions than it was actually using: https://github.com/keybase/kbfs/issues/212






          share|improve this answer








          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
            – Kamil Maciorowski
            Nov 24 at 8:55










          • I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
            – Diagon
            Nov 24 at 9:01










          • Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
            – Christoph Sommer
            Nov 24 at 9:05











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fsuperuser.com%2fquestions%2f1377964%2ftwo-dirs-of-identical-ownership-but-cat-f-produces-differently-owned-files%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          The path component kbfs sounds like its contents could be on another filesystem (kbfs is the name of the filesystem keybase uses).



          It is not unheard-of for special file systems to not adhere to common expectations about permissions.



          See also an old bug in keybase where, in its filesystem, it was reporting completely different permissions than it was actually using: https://github.com/keybase/kbfs/issues/212






          share|improve this answer








          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
            – Kamil Maciorowski
            Nov 24 at 8:55










          • I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
            – Diagon
            Nov 24 at 9:01










          • Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
            – Christoph Sommer
            Nov 24 at 9:05















          up vote
          2
          down vote



          accepted










          The path component kbfs sounds like its contents could be on another filesystem (kbfs is the name of the filesystem keybase uses).



          It is not unheard-of for special file systems to not adhere to common expectations about permissions.



          See also an old bug in keybase where, in its filesystem, it was reporting completely different permissions than it was actually using: https://github.com/keybase/kbfs/issues/212






          share|improve this answer








          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















          • Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
            – Kamil Maciorowski
            Nov 24 at 8:55










          • I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
            – Diagon
            Nov 24 at 9:01










          • Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
            – Christoph Sommer
            Nov 24 at 9:05













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          The path component kbfs sounds like its contents could be on another filesystem (kbfs is the name of the filesystem keybase uses).



          It is not unheard-of for special file systems to not adhere to common expectations about permissions.



          See also an old bug in keybase where, in its filesystem, it was reporting completely different permissions than it was actually using: https://github.com/keybase/kbfs/issues/212






          share|improve this answer








          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          The path component kbfs sounds like its contents could be on another filesystem (kbfs is the name of the filesystem keybase uses).



          It is not unheard-of for special file systems to not adhere to common expectations about permissions.



          See also an old bug in keybase where, in its filesystem, it was reporting completely different permissions than it was actually using: https://github.com/keybase/kbfs/issues/212







          share|improve this answer








          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer






          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered Nov 24 at 8:47









          Christoph Sommer

          1713




          1713




          New contributor




          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Christoph Sommer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.












          • Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
            – Kamil Maciorowski
            Nov 24 at 8:55










          • I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
            – Diagon
            Nov 24 at 9:01










          • Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
            – Christoph Sommer
            Nov 24 at 9:05


















          • Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
            – Kamil Maciorowski
            Nov 24 at 8:55










          • I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
            – Diagon
            Nov 24 at 9:01










          • Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
            – Christoph Sommer
            Nov 24 at 9:05
















          Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
          – Kamil Maciorowski
          Nov 24 at 8:55




          Quick search reveals /run/user/1000/keybase/kbfs is indeed a mountpoint for FUSE filesystem and the relevant executable is kbfsfuse.
          – Kamil Maciorowski
          Nov 24 at 8:55












          I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
          – Diagon
          Nov 24 at 9:01




          I think what's happening - maybe you can tell me if this is right - is that when writing to this filesystem, it is actually keybase that's doing the writing, and keybase itself is running as user myself, but group root. (Is that the way it works, that a running daemon has a user/group under which it runs?) As a result files take on that ownership.
          – Diagon
          Nov 24 at 9:01












          Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
          – Christoph Sommer
          Nov 24 at 9:05




          Filesystems are free to report whatever permissions they want and free to use whatever logic to decide who is allowed to do what on the filesystem. Most standard file systems are sticking to established conventions here, so that the user can predict which operations will be successful - but, really, nothing stops a filesystem from telling a user "nobody can write to this file" and, in reality, allowing everybody to do so.
          – Christoph Sommer
          Nov 24 at 9:05


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • 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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2fsuperuser.com%2fquestions%2f1377964%2ftwo-dirs-of-identical-ownership-but-cat-f-produces-differently-owned-files%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







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido