-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full/absolute path used in log files #257
Comments
I agree that there are cases of unnecessary absolute path usage in Potku, but it's not very simple or (important) to fix. There are roughly 4 categories of files that use absolute paths:
My view on the issue:
Also, retrieving relative paths from As far as privacy implications go, this is difficult to fix. Even one absolute path slip-up in the request folder would be enough to leak everything. |
I have some opinions about these. For logging purposes one should log the path that is actually used, whether it is relative or absolute. To deal with privacy issues one should (try to) use relative paths when accessing user data (e.g. requests). I agree that slip-ups are inevitable and I think logfiles are inherently private. The solution to privacy issues is to make a feature to export project in some package which does not include logfiles, generated files or other files present in the filesystem but not used by Potku. The remaining files must use relative paths. When it comes to C programs, there is no hard distinction between absolute and relative paths and I expect most programs to function just as well with relative paths as absolute paths. The programmer has to make a special effort to break compatibility with relative paths. It would be preferable to run the C programs so that their current working directory is changed to the request path. For example "Efficiency directory" in tof.in file can then be given as a relative path. However the path to distribution data (e.g. masses.dat) might then leak, and it could contain the username. Slip-ups are hard to avoid indeed. One possible solution to this particular problem (EDIT: of Potku installation directory path leaking) is to install Potku to Program files (Windows), /Applications (macOS), or /usr (Linux). The latest versions of JIBAL library (not yet used by Potku) could also be a part of the solution, the location of distribution data can be "autodetected" if an installer is used or if files are present in predictable locations. This too gets complex very quickly... Right now JIBAL is configured using jibal.conf present in the bin-directory, but there are alternatives to that. There is a larger issue of supporting user-supplied data (stopping, straggling, masses...). Right now this is possible if the user removes jibal.conf supplied by Potku and provides an alternative elsewhere. The alternative can also be created interactively with the help of a bootstrap tool. |
Good to know, thanks for the clarification.
This may (or may not be) a good idea in general, but I don't think it fixes this particular issue. It's the request files' location that are leaked, so moving the binaries themselves wouldn't do anything. (Windows perspective:) If the request files were saved in Program files too, they wouldn't leak usernames anymore, but other problems would arise:
Now that I think about it, Potku is portable and request folders can be saved anywhere already. If a user finds it important to hide their username, they can already do so. Maybe a notice about this in the documentation/program would suffice? |
I meant that part as a continuation of the previous point, sorry for the confusion. I meant that operating with relative paths for request data (and logging those) while using absolute paths (to e.g. Program files) for distribution data would be a possible fix. Requests should of course be stored under the "home" directory from my Mac/Linux perspective. Good point that anonymity may be obtained by changing the request folder. |
Full path is used in several files, showing among other things creators username. If data is shared to other people this information is shared with data.
Usage is mostly in log files, so there should not be need for this information, use of relative path to data root more appropriate?
Sample of files where found:
Sample_01-sample1/MC_simulation_01-815/widget_energy_spectrum_1.save
Sample_01-sample1/MC_simulation_01-815/default.log
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-01-26_14.56.09.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-02_15.44.01.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-28_09.30.23.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-28_09.42.42.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-03-03_15.36.28.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-03-03_15.30.38.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-28_09.35.35.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-28_09.28.08.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-03-07_08.57.02.bak
Sample_01-sample1/Measurement_01-ToF-E-815/tof_in/tof.in_2022-02-28_09.38.57.bak
Sample_01-sample1/Measurement_01-ToF-E-815/default.log
Default/Detector/points.pkl
request.log
The text was updated successfully, but these errors were encountered: