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

"Permission denied" is common and should not have a scary message #71

Open
Redsandro opened this issue Mar 29, 2021 · 1 comment
Open
Labels
improvement Makes something better (faster, uses less memory, easier to use correctly)

Comments

@Redsandro
Copy link

I was running rdfind on a backup drive. I got hundreds of these scary messages:

Dirlist.cc::handlepossiblefile: This should never happen. FIXME! details on the next row:

Comments in the code suggests files were possibly open and written to by someone else.

rdfind/Dirlist.cc

Lines 162 to 169 in fa7752d

std::cerr << "Dirlist.cc::handlepossiblefile: This should never happen. "
"FIXME! details on the next row:\n";
std::cerr << "possiblefile=\"" << possiblefile << "\"\n";
// this should never happen, because this function is only to be called
// for items that can not be opened with opendir.
// maybe it happens if someone else is changing the file while we
// are reading it?
return -2;

Turns out those dirs were simply owned by other users. Workaround: use sudo.

I suggest a permission/user check and a less alarming error message.

@pauldreik
Copy link
Owner

I agree this text is too alarming.

@pauldreik pauldreik added the improvement Makes something better (faster, uses less memory, easier to use correctly) label Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Makes something better (faster, uses less memory, easier to use correctly)
Projects
None yet
Development

No branches or pull requests

2 participants