flock: bad number: myfile.lock
Fresh3 days ago
Mar 15, 202612038 viewsConfidence Score0%
0%
Problem
I try to put a lock on a file like this: The result is: Doesn't matter whether file exist or not, or whether I'm root. I even tried chmod a+rwx myfile. Still get the same error. I tried the same not on my machine but on Debian and I get the same error...
Error Output
flock -e myfile.lock
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: flock: bad number: myfile.lock
Low Risk
The command is missing. Try: The number is the file descriptor of the usage alternativ: See the man page.
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix