Jude DaShiell wrote:
> > The setgid is normal.  But your permissions on the directory have been
> > corrupted.  You could probably fix the permissions.  Or purge and
> > re-install but that would of course lose any of your saved games.
>
> Using chmod the first digit would be a 7 and the third digit a 5 but what 
> would rws be for that second digit?

You want all of the directories to be drwxrwsr-x root games and all of
the files to be -rw-rw-r-- root games.

  # find /var/games/nethack -exec chown -v root:games {} +

  # find /var/games/nethack -type d -exec chmod -v a=rx,ug+w,g+s {} +

  # find /var/games/nethack -type f -exec echo chmod -v a=r,ug+w {} +

The find will traverse the directories finding files.  The -exec will
execute the command on the found files.  The -v option will tell the
commands to tell you what they are doing, which is a GNU extension but
you are using Debian so okay.  The "a=" part sets up the base
permission in this case with a=rx meaning r-xr-xr-x and then the ug+w
adds write permission for user and group to  rwxrwxr-x and the g+s
adds set-gid to rwxrwsr-x and should correct your problem.

That should fix the nethack /var directory okay.  But if those
permissions were munged then what else on your system was broken too?

Bob


Attachment: signature.asc
Description: Digital signature

Reply via email to