Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Aug 2014 14:21:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 192743] New: games/nethack34-nox11: Cannot run the game as non-root user
Message-ID:  <bug-192743-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: ports@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-192743-13>