Running nethack-nox11 (installed via pkg) as any user, except for root, makes the game exit with the error: "No write permission to lock perm!" THE CAUSE OF THE PROBLEM: ------------------------- The game is trying to create a lockfile (named "alock.$NUM") in "/usr/local/share/nethack/". That directory, however, is owned by root:wheel, and not root:games; furthermore, it is not writable by group. POSSIBLE SOLUTION: ------------------ I believe the best solution is to have nethack write the lockfile in "/var/games/" instead (which has the correct group and permissions) --- that directory is currently unused. I suspect it was intended for that purpose in the first place. --- In case anyone else has this problem: a temporary solution is to do the following: chgrp games /usr/local/share/nethack chmod g+w /usr/local/share/nethack This will ensure the game can create lockfiles in said directory. The user does *NOT* need to be added to the `games` group (/usr/local/share/nethack/nethack has the setgid bit set).
I forgot to note that games/nethack34 (as in, the variant *with* X11) has the same problem in CLI mode --- but I haven't tried it in graphical mode.
over to maintainer
A commit references this bug: Author: glewis Date: Sun Feb 22 18:58:38 UTC 2015 New revision: 379621 URL: https://svnweb.freebsd.org/changeset/ports/379621 Log: . Fix permissions on DATADIR PR: 192743 Changes: head/games/nethack34/pkg-plist
Sorry for not fixing this earlier.