Skip to content
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

Creating custom signature for PhotoRec: .photorec.sig/photorec.sig actual search location might not be what we think... #6

Open
lebarsfa opened this issue Oct 21, 2023 · 2 comments

Comments

@lebarsfa
Copy link

lebarsfa commented Oct 21, 2023

The documentation on https://www.cgsecurity.org/testdisk_doc/photorec_custom_signature.html#file-location suggests that .photorec.sig can be put in the HOME directory.
However, on Ubuntu 22.04 I get:

user@Ubuntu64:~/Downloads/testdisk-7.2-WIP.linux26-x86_64/testdisk-7.2-WIP$ cat ~/.photorec.sig 
zstd 0 0x28, 0xB5, 0x2F, 0xFD
user@Ubuntu64:~/Downloads/testdisk-7.2-WIP.linux26-x86_64/testdisk-7.2-WIP$ sudo ./fidentify_static ~/Downloads/f802010968.zstd 
/home/user/Downloads/f802010968.zstd: unknown
user@Ubuntu64:~/Downloads/testdisk-7.2-WIP.linux26-x86_64/testdisk-7.2-WIP$ sudo -E ./fidentify_static ~/Downloads/f802010968.zstd 
/home/user/Downloads/f802010968.zstd: zstd
user@Ubuntu64:~/Downloads/testdisk-7.2-WIP.linux26-x86_64/testdisk-7.2-WIP$ ./fidentify_static ~/Downloads/f802010968.zstd 
/home/user/Downloads/f802010968.zstd: zstd

Is it possible to emphasize in the documentation that running with sudo (or possibly using right-click and Run as administrator on Windows or other methods that could explicitly or silently make the program run as another user/administrator) may change what is considered as HOME/USERPROFILE directory? Also, the actual current directory may vary depending on several factors (it could be the program location, the current directory if run from the terminal, it could be dynamically changed by the program or OS, etc.).

This is because I think I ran into this trap and I suspect e.g. https://forum.cgsecurity.org/phpBB3/viewtopic.php?p=37647#p37647 had the same problem.

@cgsecurity
Copy link
Owner

I have added a warning in https://www.cgsecurity.org/testdisk_doc/photorec_custom_signature.html#run-photorec
Please tell me if it's OK as it is or feel free to provide an alternative text ;-)

@lebarsfa
Copy link
Author

OK, many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants