[Bug 192743] New: games/nethack34-nox11: Cannot run the game as non-root user

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Aug 17 14:21:38 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192743

            Bug ID: 192743
           Summary: games/nethack34-nox11: Cannot run the game as non-root
                    user
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: ports at stdrand.com

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).

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list