How do I see what program accessed my files?












0















I am going through my Recent folder on ubuntu and I see there are files which I did not directly access myself. If I right click on a file it will say Accessed: with a certain time and date there.



Is there anyway I can tell what program or process accessed that file?



I am running Ubuntu 16.04 and using GNOME.










share|improve this question







New contributor




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

























    0















    I am going through my Recent folder on ubuntu and I see there are files which I did not directly access myself. If I right click on a file it will say Accessed: with a certain time and date there.



    Is there anyway I can tell what program or process accessed that file?



    I am running Ubuntu 16.04 and using GNOME.










    share|improve this question







    New contributor




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























      0












      0








      0








      I am going through my Recent folder on ubuntu and I see there are files which I did not directly access myself. If I right click on a file it will say Accessed: with a certain time and date there.



      Is there anyway I can tell what program or process accessed that file?



      I am running Ubuntu 16.04 and using GNOME.










      share|improve this question







      New contributor




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












      I am going through my Recent folder on ubuntu and I see there are files which I did not directly access myself. If I right click on a file it will say Accessed: with a certain time and date there.



      Is there anyway I can tell what program or process accessed that file?



      I am running Ubuntu 16.04 and using GNOME.







      files






      share|improve this question







      New contributor




      Jon 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 question







      New contributor




      Jon 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 question




      share|improve this question






      New contributor




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









      asked Mar 11 at 5:24









      JonJon

      101




      101




      New contributor




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





      New contributor





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






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






















          1 Answer
          1






          active

          oldest

          votes


















          1















          Is there anyway I can tell what program or process accessed that file?




          No -- not in default implementation as there is no process (or kernel for that matter) tracking that in general (there could be specific cases for some programs, which are program specific obviously), and dumping log or keeping in memory.



          But there are ways, if you want to do that. The best IMO would be to use the inotify family of system calls to track the filesystem accesses. You are basically looking for the inotifywait userspace command (comes with inotify-tools package) to set a watch on the accesses of desired file(s), and do any operation like logging if you want.



          Here is an old answer of mine to get you started.



          Further hint: you're looking for the access event.






          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',
            autoActivateHeartbeat: false,
            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
            });


            }
            });






            Jon is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124669%2fhow-do-i-see-what-program-accessed-my-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









            1















            Is there anyway I can tell what program or process accessed that file?




            No -- not in default implementation as there is no process (or kernel for that matter) tracking that in general (there could be specific cases for some programs, which are program specific obviously), and dumping log or keeping in memory.



            But there are ways, if you want to do that. The best IMO would be to use the inotify family of system calls to track the filesystem accesses. You are basically looking for the inotifywait userspace command (comes with inotify-tools package) to set a watch on the accesses of desired file(s), and do any operation like logging if you want.



            Here is an old answer of mine to get you started.



            Further hint: you're looking for the access event.






            share|improve this answer




























              1















              Is there anyway I can tell what program or process accessed that file?




              No -- not in default implementation as there is no process (or kernel for that matter) tracking that in general (there could be specific cases for some programs, which are program specific obviously), and dumping log or keeping in memory.



              But there are ways, if you want to do that. The best IMO would be to use the inotify family of system calls to track the filesystem accesses. You are basically looking for the inotifywait userspace command (comes with inotify-tools package) to set a watch on the accesses of desired file(s), and do any operation like logging if you want.



              Here is an old answer of mine to get you started.



              Further hint: you're looking for the access event.






              share|improve this answer


























                1












                1








                1








                Is there anyway I can tell what program or process accessed that file?




                No -- not in default implementation as there is no process (or kernel for that matter) tracking that in general (there could be specific cases for some programs, which are program specific obviously), and dumping log or keeping in memory.



                But there are ways, if you want to do that. The best IMO would be to use the inotify family of system calls to track the filesystem accesses. You are basically looking for the inotifywait userspace command (comes with inotify-tools package) to set a watch on the accesses of desired file(s), and do any operation like logging if you want.



                Here is an old answer of mine to get you started.



                Further hint: you're looking for the access event.






                share|improve this answer














                Is there anyway I can tell what program or process accessed that file?




                No -- not in default implementation as there is no process (or kernel for that matter) tracking that in general (there could be specific cases for some programs, which are program specific obviously), and dumping log or keeping in memory.



                But there are ways, if you want to do that. The best IMO would be to use the inotify family of system calls to track the filesystem accesses. You are basically looking for the inotifywait userspace command (comes with inotify-tools package) to set a watch on the accesses of desired file(s), and do any operation like logging if you want.



                Here is an old answer of mine to get you started.



                Further hint: you're looking for the access event.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 11 at 5:36









                heemaylheemayl

                67.5k10142214




                67.5k10142214






















                    Jon is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Jon is a new contributor. Be nice, and check out our Code of Conduct.













                    Jon is a new contributor. Be nice, and check out our Code of Conduct.












                    Jon is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1124669%2fhow-do-i-see-what-program-accessed-my-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

                    How did Captain America manage to do this?

                    迪纳利

                    南乌拉尔铁路局