-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
"Path ... world-writable or a symlink" error message is very confusing #13701
Copy link
Copy link
Closed
Labels
error-messagesConfusing messages and better diagnosticsConfusing messages and better diagnosticsgood first issueQuick win for first-time contributorsQuick win for first-time contributorsidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Metadata
Metadata
Assignees
Labels
error-messagesConfusing messages and better diagnosticsConfusing messages and better diagnosticsgood first issueQuick win for first-time contributorsQuick win for first-time contributorsidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Describe the bug
In 2.30,
build-dirnow defaults to/nix/var/nix/builds, and a check is added to make sure none of the components are world writable. However, the error message simply says:I have found three users in the wild running into this error and at a complete loss of what to do to fix this, assuming that it must be a horrible regression with Nix. Turns out:
/mounted as tmpfs but forgot to specify amode, leaving it as1777/as mode0777It turns out even for moderately experienced Linux users it is not entirely obvious how to get the mode of the root directory.
ls -l /shows the contents and does not tell you about the permissions on the root dir itself. You have to usels -la /which shows root as., orls -ldwhich shows the root on its own.A better message (such as one pointing out the path and permissions of the exact problematic path) would help users of Nix 2.30 better understand what is wrong.
Steps To Reproduce
mode=0755, so the mode defaults to1777Expected behavior
Some useful error message pointing to the fact that
/has an insecure modeMetadata
Nix >= 2.30
Additional context
Checklist
Add 👍 to issues you find important.