Hide Forgot
Description of problem: Running "losetup -f" as a non-root user when no loop devices are available fails with an unhelpful error message that doesn't tell the user they can run "sudo losetup -f" to automatically create a new loopback device. Version-Release number of selected component (if applicable): util-linux-2.26.1-1.fc22.x86_64 How reproducible: Always Steps to Reproduce: 1. Run "losetup -f" as a non-root user with no loop devices created (the default) 2. 3. Actual results: $ losetup -f losetup: cannot find an unused loop device: No such file or directory Expected results: $ losetup -f losetup: cannot find an unused loop device (Root access required to automatically create new loop devices) (It doesn't necessarily need to be that exact message, but there should be an explicit nudge towards "run losetup as root to create a new loop device" Additional info: The man pages for losetup, cryptsetup and tcplay also fail to mention this fact, which makes the default behaviour of failing to provide any loop devices by default (as per bug 896160) very confusing when attempting to follow the cryptsetup and tcplay man pages to mount an encrypted file as a volume (as per bug 1019440).
Improved in upstream tree by commit 362f5d203581e895005b91383ea7b1affafd8eba. I don't think it's good idea to talk about "root", like in many other situations "Permission denied" is good enough. $ losetup -f lt-losetup: cannot find an unused loop device: Permission denied