66 :target: https://travis-ci.org/pleiszenburg/loggedfs-python
77 :alt: Build Status: development branch
88
9- |build_master | |build_develop |
10-
11- LoggedFS-python - Filesystem monitoring with Fuse and Python
12- ============================================================
13-
14- PROJECT STATUS NOTICE: **BETA ** (UNDER DEVELOPMENT)
15- ---------------------------------------------------
16-
17- FILESYSTEM PASSES `TEST SUITE FOR POSIX COMPLIANCE `_ - ALL OF IT.
18-
19- A CUSTOM BUG-FIXED VERSION OF `FUSEPY `_ IS REQUIRED FOR FULL POSIX COMPLIANCE.
20- IF THE LATEST OFFICIAL RELEASE OF FUSEPY IS USED INSTEAD, TIMESTAMPS WILL BE
21- INACCURATE ON A NANOSECOND TO MICROSECOND SCALE.
22- THERE IS A `PENDING PULL REQUEST `_.
23-
24- THE FILESYSTEM HAS YET **NOT ** BEEN **STRESS-TESTED **.
9+ .. |loggedfs_python_logo | image :: http://www.pleiszenburg.de/loggedfs-python_logo.png
10+ :target: https://github.com/pleiszenburg/loggedfs-python
11+ :alt: LoggedFS-python repository
2512
26- THE FILESYSTEM IS CURRENTLY **ONLY ** BEING DEVELOPED FOR AND TESTED ON **LINUX **.
27- ANYONE INTERESTED IN ADDING MACOS AND/OR BSD SUPPORT?
28-
29- .. _FUSEPY : https://github.com/s-m-e/fusepy
30- .. _TEST SUITE FOR POSIX COMPLIANCE : https://github.com/pjd/pjdfstest
31- .. _PENDING PULL REQUEST : https://github.com/terencehonles/fusepy/pull/76
32-
33- Description
34- -----------
13+ |build_master | |build_develop |
3514
36- LoggedFS-python is a fuse-based filesystem which can log every operation that
37- happens in it. It is a pure Python re-implementation of
38- `LoggedFS `_ by `Rémi Flament `_ - heavily inspired by `Stavros Korokithakis `_'
39- 2013 blog post entitled "`Writing a FUSE filesystem in Python `_"
40- (`source code repository `_).
15+ |loggedfs_python_logo |
4116
42- How does it work?
17+ Synopsis
18+ ========
4319
44- Fuse does almost everything. LoggedFS-python only sends a message to ``syslog ``
45- when called by fuse and then let the real filesystem do the rest of the job.
20+ LoggedFS-python is a FUSE-based filesystem which can log every operation that happens in it.
21+ It is a pure Python re-implementation of `LoggedFS `_ by `Rémi Flament `_ maintaining CLI compatibility.
22+ The project is heavily inspired by `Stavros Korokithakis `_' 2013 blog post entitled
23+ "`Writing a FUSE filesystem in Python `_" (`source code repository `_).
24+ The filesystem is fully `POSIX `_ compliant (passing the `pjdfstest test-suite `_)
25+ and intended to be suitable for production systems (it is not yet!).
4626
4727.. _LoggedFS : https://github.com/rflament/loggedfs
4828.. _Rémi Flament : https://github.com/rflament
4929.. _Stavros Korokithakis : https://github.com/skorokithakis
5030.. _Writing a FUSE filesystem in Python : https://www.stavros.io/posts/python-fuse-filesystem/
5131.. _source code repository : https://github.com/skorokithakis/python-fuse-sample
32+ .. _POSIX : https://en.wikipedia.org/wiki/POSIX
33+ .. _pjdfstest test-suite : https://github.com/pjd/pjdfstest
34+
35+
36+ CAVEATS
37+ =======
38+
39+ * PROJECT STATUS: **BETA **
40+ * THE FILESYSTEM HAS RECEIVED **SOME STRESS TESTS WITH FSX-LINUX **
41+ BASED ON THE `FSX-FLAVOR `_ RELEASED BY THE `LINUX TEST PROJECT `_.
42+ **FSX REPORTS WRITE HOLES! **
43+ FULL TESTS UND RELATED BUG-FIXES ARE UNDER WAY.
44+ * A `CUSTOM BUG-FIXED VERSION OF FUSEPY `_ IS REQUIRED FOR FULL POSIX COMPLIANCE.
45+ IF THE LATEST OFFICIAL RELEASE OF FUSEPY IS USED INSTEAD, TIMESTAMPS WILL BE
46+ INACCURATE ON A NANOSECOND TO MICROSECOND SCALE AND UTIME_NOW AS WELL AS
47+ UTIME_OMIT WILL NOT BE HONORED. THERE IS A `PENDING PULL REQUEST `_.
48+ * THE FILESYSTEM IS CURRENTLY **ONLY ** BEING DEVELOPED FOR AND TESTED ON **LINUX **.
49+ ANYONE INTERESTED IN ADDING MAC OS X AND/OR BSD SUPPORT?
50+
51+ .. _FSX-FLAVOR : http://codemonkey.org.uk/projects/fsx/
52+ .. _LINUX TEST PROJECT : https://github.com/linux-test-project/ltp
53+ .. _CUSTOM BUG-FIXED VERSION OF FUSEPY : https://github.com/s-m-e/fusepy
54+ .. _PENDING PULL REQUEST : https://github.com/fusepy/fusepy/pull/79
55+
5256
5357Installation
54- ------------
58+ ============
5559
5660.. code :: bash
5761
5862 pip install git+https://github.com/pleiszenburg/loggedfs-python.git@master
5963
60- Simplest usage
61- --------------
64+ This project has intentionally not yet been published in the `Python Package Index `_ (PyPI).
65+ It will be released on PyPI once critical changes have been merged into `fusepy `_,
66+ a dependency of LoggedFS-python.
6267
63- To record access to `` /tmp/TEST `` into `` ~/log.txt ``, just do:
68+ ** Supports Python 3.{4,5,6}. **
6469
65- .. code :: bash
70+ **Supports Linux. **
71+ Support for MAC OS X and BSD likely requires minor changes only, but has yet not been added.
6672
67- loggedfs -l ~ /log.txt /tmp/TEST
73+ .. _Python Package Index : https://pypi.org/
74+ .. _fusepy : https://github.com/fusepy/fusepy
6875
69- To stop recording, just unmount as usual:
76+
77+ Simple usage example
78+ ====================
79+
80+ To start recording access to ``/tmp/TEST `` into ``/root/log.txt ``, just do:
7081
7182.. code :: bash
7283
73- sudo umount /tmp/TEST
84+ sudo loggedfs -p -s -l /root/log.txt /tmp/TEST
7485
75- `` ~/log.txt `` will need to be changed to readable by setting permissions :
86+ To stop recording, just unmount as usual :
7687
7788.. code :: bash
7889
79- chmod 0666 ~ /log.txt
90+ sudo fusermount -u /tmp/TEST
91+
8092
8193 Configuration
82- -------------
94+ =============
8395
8496LoggedFS-python can use an XML configuration file if you want it to log
8597operations only for certain files, for certain users, or for certain operations.
86- The format is compatible with LoggedFS' original format.
98+ The format is fully compatible with LoggedFS' original format.
8799
88100Here is a sample configuration file :
89101
@@ -105,39 +117,43 @@ Here is a sample configuration file :
105117 This configuration can be used to log everything except if it concerns a
106118``*.bak `` file, or if the ``uid `` is 1000, or if the operation is ``getattr ``.
107119
108- Launching LoggedFS-python
109- -------------------------
110120
111- If you just want to test LoggedFS-python you don't need any configuration file.
121+ Need help?
122+ ==========
112123
113- Just use that command:
124+ Feel free to post questions in the ` GitHub issue tracker `_ of this project.
114125
115- .. code :: bash
126+ .. _ GitHub issue tracker : https://github.com/pleiszenburg/loggedfs-python/issues
116127
117- loggedfs -f -p /var
118128
119- You should see logs like these:
129+ Bugs & issues
130+ =============
120131
121- ::
132+ Please report bugs in LoggedFS-python here in its ` GitHub issue tracker `_.
122133
123- tail -f /var/log/syslog
124- 2017-12-09 17:29:34,910 (loggedfs-python) LoggedFS-python running as a public filesystem
125- 2017-12-09 17:29:34,915 (loggedfs-python) LoggedFS-python not running as a daemon
126- 2017-12-09 17:29:34,920 (loggedfs-python) LoggedFS-python starting at /var
127- 2017-12-09 17:29:34,950 (loggedfs-python) chdir to /var
128- 2017-12-09 17:29:35,246 (loggedfs-python) getattr /var/ {SUCCESS} [ pid = 8700 kded [kdeinit] uid = 1000 ]
129- 2017-12-09 17:29:41,841 (loggedfs-python) getattr /var/ {SUCCESS} [ pid = 10923 ls uid = 1000 ]
130- 2017-12-09 17:29:41,858 (loggedfs-python) getattr /var/run {SUCCESS} [ pid = 10923 ls uid = 1000 ]
131- 2017-12-09 17:29:41,890 (loggedfs-python) getattr /var/run/nscd {FAILURE} [ pid = 10923 ls uid = 1000 ]
132- 2017-12-09 17:29:41,912 (loggedfs-python) readdir /var/ {SUCCESS} [ pid = 10923 ls uid = 1000 ]
133- 2017-12-09 17:29:41,987 (loggedfs-python) getattr /var/pouak {SUCCESS} [ pid = 10923 ls uid = 1000 ]
134134
135- If you have a configuration file to use you should use this command:
135+ Miscellaneous
136+ =============
136137
137- .. code :: bash
138+ - Full project documentation
139+
140+ - at `Read the Docs `_
141+ - at `LoggedFS-python repository `_
138142
139- loggedfs -c loggedfs.xml -p /var
143+ - `License `_ (**Apache License 2.0 **)
144+ - `Contributing `_ (**Contributions are highly welcomed! **)
145+ - `FAQ `_
146+ - `Authors `_
147+ - `Changes `_
148+ - `Long-term ideas `_
149+ - `Upstream issues `_ (relevant bugs in dependencies)
140150
141- If you want to log what other users do on your filesystem, you should use the
142- ``-p `` option to allow them to see your mounted files. For a complete
143- documentation see the manual page.
151+ .. _Read the Docs : http://loggedfs-python.readthedocs.io/en/latest/
152+ .. _LoggedFS-python repository : https://github.com/pleiszenburg/loggedfs-python/blob/master/docs/index.rst
153+ .. _License : https://github.com/pleiszenburg/loggedfs-python/blob/master/LICENSE
154+ .. _Contributing : https://github.com/pleiszenburg/loggedfs-python/blob/master/CONTRIBUTING.rst
155+ .. _FAQ : http://loggedfs-python.readthedocs.io/en/stable/faq.html
156+ .. _Authors : https://github.com/pleiszenburg/loggedfs-python/blob/master/AUTHORS.rst
157+ .. _Changes : https://github.com/pleiszenburg/loggedfs-python/blob/master/CHANGES.rst
158+ .. _Long-term ideas : https://github.com/pleiszenburg/loggedfs-python/milestone/2
159+ .. _Upstream issues : https://github.com/pleiszenburg/loggedfs-python/issues?q=is%3Aissue+is%3Aopen+label%3Aupstream
0 commit comments