Error message question.

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Decided to try Nethack. Downloaded the linux binary and launched it.
Interesting, but obviously I needed to learn a bit. Anyway, I had
several terminals open and clicked the wrong one closed... the one with
nethack running.

Tried again, but now it says: "No write permission to lock perm!". Can
run as another user, though.

So I grabbed the source, and found it was issued with an access error
message (-EACCES), at which point I suddenly realized I was over my
head... ;). Looked for a lock file, and found nothing. Changed
permissions on /usr/games/lib/nethackdir/perm to global write, didn't
help. Blew away entire installation and started over again. Didn't
help.

Can someone point me to the fix for this, please! I really do want to
give this a go...

Thanks,

Longfellow
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow <not@this.address> wrote in
news:11brod2evlnge96@corp.supernews.com:

> Decided to try Nethack. Downloaded the linux binary and launched it.
> Interesting, but obviously I needed to learn a bit. Anyway, I had
> several terminals open and clicked the wrong one closed... the one with
> nethack running.
>
> Tried again, but now it says: "No write permission to lock perm!". Can
> run as another user, though.
>
> So I grabbed the source, and found it was issued with an access error
> message (-EACCES), at which point I suddenly realized I was over my
> head... ;). Looked for a lock file, and found nothing. Changed
> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
> help. Blew away entire installation and started over again. Didn't
> help.
>
> Can someone point me to the fix for this, please! I really do want to
> give this a go...
>
> Thanks,
>
> Longfellow
>
>
if it was "...write lock" check what df says about that drive. My guess is
that it says that free space is 0. Try deleting all files in /tmp. And it is
a BAD (read VERY) idea to change permissions or ownership of files. You will
probably have to reinstall nethack over itself to fix it.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow wrote:
> Decided to try Nethack. Downloaded the linux binary and launched it.
> Interesting, but obviously I needed to learn a bit. Anyway, I had
> several terminals open and clicked the wrong one closed... the one with
> nethack running.
>
> Tried again, but now it says: "No write permission to lock perm!". Can
> run as another user, though.
>
> So I grabbed the source, and found it was issued with an access error
> message (-EACCES), at which point I suddenly realized I was over my
> head... ;). Looked for a lock file, and found nothing. Changed
> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
> help. Blew away entire installation and started over again. Didn't
> help.
>
> Can someone point me to the fix for this, please! I really do want to
> give this a go...

It might help if you could post a listing of your playground files,
preferably via the following command:

ls -l /usr/games/lib/nethackdir

There is probably a fair number of files there that are preventing your
normal user account from starting up because they exist. When you invoke
nethack, if it finds that the current user has files like those in the
playground it will prevent you from continuing - this is normally a good
thing, unless you do what you did.

If you want to continue the game you inadvertantly closed, you'll need
to use recover (if the RPM package makes it available to you). If you
don't care about the game you had going, you should be able to rectify
the situation by removing all the lock files.

Hope this helps!

-Ken
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On 2005-06-26, chuck <chucko@nil.car> wrote:
> Longfellow <not@this.address> wrote in
> news:11brod2evlnge96@corp.supernews.com:
>
>> Decided to try Nethack. Downloaded the linux binary and launched it.
>> Interesting, but obviously I needed to learn a bit. Anyway, I had
>> several terminals open and clicked the wrong one closed... the one with
>> nethack running.
>>
>> Tried again, but now it says: "No write permission to lock perm!". Can
>> run as another user, though.
>>
>> So I grabbed the source, and found it was issued with an access error
>> message (-EACCES), at which point I suddenly realized I was over my
>> head... ;). Looked for a lock file, and found nothing. Changed
>> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
>> help. Blew away entire installation and started over again. Didn't
>> help.
>>
>> Can someone point me to the fix for this, please! I really do want to
>> give this a go...
>>
>> Thanks,
>>
>> Longfellow
>>
>>
> if it was "...write lock" check what df says about that drive. My guess is
> that it says that free space is 0. Try deleting all files in /tmp. And it is
> a BAD (read VERY) idea to change permissions or ownership of files. You will
> probably have to reinstall nethack over itself to fix it.

/dev/hda9 4956284 3674536 1025916 79% /

Ummm... it said: "No write permission to lock perm!". Think that means
"no write permission", not "...write lock".

I've run Slackware for years, so understand something of file
parameters. It's not a good idea to change *system* file parameters, as
that can result in system malfunction. Otherwise, keep track of what
you change, etc...

Thanks anyway,

Longfellow
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow wrote:

> [root@alpha /usr/games/lib/nethackdir]# ls -l
> total 2980
> -rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
> drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save

You should probably do something like

chown root:games *
chmod g+s nethack recover
chmod g+w save

from this directory (and change group ownership of any files in the save
directory as well). This assumes you have a "games" group on your system,
but if you don't you can make one.

--
Benjamin Lewis

"Love is a snowmobile racing across the tundra and then suddenly it flips
over, pinning you underneath. At night, the ice weasels come."
--Matt Groening
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On 2005-06-26, Ken Cuvelier <kvcflameNO@SPAMyahoo.com> wrote:
> Longfellow wrote:
>> Decided to try Nethack. Downloaded the linux binary and launched it.
>> Interesting, but obviously I needed to learn a bit. Anyway, I had
>> several terminals open and clicked the wrong one closed... the one with
>> nethack running.
>>
>> Tried again, but now it says: "No write permission to lock perm!". Can
>> run as another user, though.
>>
>> So I grabbed the source, and found it was issued with an access error
>> message (-EACCES), at which point I suddenly realized I was over my
>> head... ;). Looked for a lock file, and found nothing. Changed
>> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
>> help. Blew away entire installation and started over again. Didn't
>> help.
>>
>> Can someone point me to the fix for this, please! I really do want to
>> give this a go...
>
> It might help if you could post a listing of your playground files,
> preferably via the following command:
>
> ls -l /usr/games/lib/nethackdir

[root@alpha /usr/games/lib/nethackdir]# ls -l
total 2980
-r--r--r-- 1 root users 152347 2003-12-07 15:48 Guidebook.txt
-rw-r--r-- 1 root users 7329 2003-12-07 15:48 NetHack.ad
-r--r--r-- 1 root users 4213 2003-12-07 15:48 README.linux
-r--r--r-- 1 root users 2410 2003-12-07 15:48 dot.nethackrc
-rw-r--r-- 1 root users 86 2003-12-07 15:48 fonts.dir
-rw-r--r-- 1 root users 22584 2003-12-07 15:48 ibm.pcf
-rw-r--r-- 1 root users 4875 2003-12-07 15:48 license
-rw-r--r-- 1 root users 0 2003-12-07 15:48 logfile
-rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
-r--r--r-- 1 root users 9520 2003-12-07 15:48 nethack.txt
-rw-r--r-- 1 root users 28896 2003-12-07 15:48 nh10.pcf
-rw-r--r-- 1 root users 585477 2003-12-07 15:48 nhdat
-rw-rw-r-- 1 root users 0 2003-12-07 15:48 perm
-rw-r--r-- 1 root users 296 2003-12-07 15:48 pet_mark.xbm
-rw-rw-r-- 1 root users 0 2003-12-07 15:48 record
-rwxr-xr-x 1 root users 13753 2003-12-07 15:48 recover
-r--r--r-- 1 root users 4228 2003-12-07 15:48 recover.txt
-rw-r--r-- 1 root users 82274 2003-12-07 15:48 rip.xpm
drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
-rw-r--r-- 1 root users 278520 2003-12-07 15:48 x11tiles

> There is probably a fair number of files there that are preventing your
> normal user account from starting up because they exist. When you invoke
> nethack, if it finds that the current user has files like those in the
> playground it will prevent you from continuing - this is normally a good
> thing, unless you do what you did.

Could you point out the offending files, please?

> If you want to continue the game you inadvertantly closed, you'll need
> to use recover (if the RPM package makes it available to you). If you
> don't care about the game you had going, you should be able to rectify
> the situation by removing all the lock files.
>
> Hope this helps!
>
> -Ken

Don't care about the game. It wasn't even started ;)

Thanks!

Longfellow
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow wrote:
> On 2005-06-26, Ken Cuvelier <kvcflameNO@SPAMyahoo.com> wrote:
> [root@alpha /usr/games/lib/nethackdir]# ls -l
> total 2980
> -r--r--r-- 1 root users 152347 2003-12-07 15:48 Guidebook.txt
> -rw-r--r-- 1 root users 7329 2003-12-07 15:48 NetHack.ad
> -r--r--r-- 1 root users 4213 2003-12-07 15:48 README.linux
> -r--r--r-- 1 root users 2410 2003-12-07 15:48 dot.nethackrc
> -rw-r--r-- 1 root users 86 2003-12-07 15:48 fonts.dir
> -rw-r--r-- 1 root users 22584 2003-12-07 15:48 ibm.pcf
> -rw-r--r-- 1 root users 4875 2003-12-07 15:48 license
> -rw-r--r-- 1 root users 0 2003-12-07 15:48 logfile
> -rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
> -r--r--r-- 1 root users 9520 2003-12-07 15:48 nethack.txt
> -rw-r--r-- 1 root users 28896 2003-12-07 15:48 nh10.pcf
> -rw-r--r-- 1 root users 585477 2003-12-07 15:48 nhdat
> -rw-rw-r-- 1 root users 0 2003-12-07 15:48 perm
> -rw-r--r-- 1 root users 296 2003-12-07 15:48 pet_mark.xbm
> -rw-rw-r-- 1 root users 0 2003-12-07 15:48 record
> -rwxr-xr-x 1 root users 13753 2003-12-07 15:48 recover
> -r--r--r-- 1 root users 4228 2003-12-07 15:48 recover.txt
> -rw-r--r-- 1 root users 82274 2003-12-07 15:48 rip.xpm
> drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
> -rw-r--r-- 1 root users 278520 2003-12-07 15:48 x11tiles
>
>
> Could you point out the offending files, please?
>

No offending files there. It's entirely possible that the files are also
going to $HOME for each user, or that the playground resides elsewhere
(for instance, with Gentoo's ebuild HACKDIR is set to
/var/games/nethack). Have you looked for hidden files in the home
directory for the user account?

My hope is that someone else familiar with the RPM package can give you
some insight into where the lock files go. Good luck!

-Ken
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Longfellow" <not@this.address> wrote in message
news:11btm2tt8o8veb6@corp.supernews.com...
> On 2005-06-26, chuck <chucko@nil.car> wrote:
>> Longfellow <not@this.address> wrote in
>> news:11brod2evlnge96@corp.supernews.com:
>>
>>> Decided to try Nethack. Downloaded the linux binary and launched it.
>>> Interesting, but obviously I needed to learn a bit. Anyway, I had
>>> several terminals open and clicked the wrong one closed... the one with
>>> nethack running.
>>>
>>> Tried again, but now it says: "No write permission to lock perm!". Can
>>> run as another user, though.
>>>
>>> So I grabbed the source, and found it was issued with an access error
>>> message (-EACCES), at which point I suddenly realized I was over my
>>> head... ;). Looked for a lock file, and found nothing. Changed
>>> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
>>> help. Blew away entire installation and started over again. Didn't
>>> help.
>>>
>>> Can someone point me to the fix for this, please! I really do want to
>>> give this a go...
>>>
>>> Thanks,
>>>
>>> Longfellow
>>>
>>>
>> if it was "...write lock" check what df says about that drive. My guess
>> is
>> that it says that free space is 0. Try deleting all files in /tmp. And it
>> is
>> a BAD (read VERY) idea to change permissions or ownership of files. You
>> will
>> probably have to reinstall nethack over itself to fix it.
>
> /dev/hda9 4956284 3674536 1025916 79% /
>
> Ummm... it said: "No write permission to lock perm!". Think that means
> "no write permission", not "...write lock".
>
> I've run Slackware for years, so understand something of file
> parameters. It's not a good idea to change *system* file parameters, as
> that can result in system malfunction. Otherwise, keep track of what
> you change, etc...
>
> Thanks anyway,
>
> Longfellow
>

I suggest copying the original file to your /home directory. That way any
after any changes you'll still have the original.
I've had to change all kinds of file parameters, change ownership on files
with CHOWN make files executable... just to get a program to work properly
on a Linux system. As long as you keep a backup copy and don't change
system files it's not going to hurt anything.
Of course I'm coming from the world of a sysadmin not a gamer so I always
just had to make things work.

AG
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow wrote:
> Ken Cuvelier wrote:
> > Longfellow wrote:
>
> >> Decided to try Nethack. Downloaded the linux binary and launched it.
> >> Interesting, but obviously I needed to learn a bit. Anyway, I had
> >> several terminals open and clicked the wrong one closed... the one with
> >> nethack running.
>
> >> Tried again, but now it says: "No write permission to lock perm!". Can
> >> run as another user, though.
>
> >> So I grabbed the source, and found it was issued with an access error
> >> message (-EACCES), at which point I suddenly realized I was over my
> >> head... ;). Looked for a lock file, and found nothing. Changed
> >> permissions on /usr/games/lib/nethackdir/perm to global write, didn't
> >> help. Blew away entire installation and started over again. Didn't
> >> help.
>
> >> Can someone point me to the fix for this, please! I really do want to
> >> give this a go...
>
> > It might help if you could post a listing of your playground files,
> > preferably via the following command:
>
> > ls -l /usr/games/lib/nethackdir

Try "-la" to show the directory permissions as well. I would
also like to see -
# ls -la ` whence nethack `
I'm interested in seeing if it is setuid or setgid.

Since the original issue was closing a terminal window, it
could be an issue with terminals. Open a bunch of windows
with something like xterm. Try to run nethack in each of
them one by one. If one works, exit nethack gracefully
and then try the others.

> [root@alpha /usr/games/lib/nethackdir]# ls -l
> total 2980
> -r--r--r-- 1 root users 152347 2003-12-07 15:48 Guidebook.txt
> -rw-r--r-- 1 root users 7329 2003-12-07 15:48 NetHack.ad
> -r--r--r-- 1 root users 4213 2003-12-07 15:48 README.linux
> -r--r--r-- 1 root users 2410 2003-12-07 15:48 dot.nethackrc
> -rw-r--r-- 1 root users 86 2003-12-07 15:48 fonts.dir
> -rw-r--r-- 1 root users 22584 2003-12-07 15:48 ibm.pcf
> -rw-r--r-- 1 root users 4875 2003-12-07 15:48 license
> -rw-r--r-- 1 root users 0 2003-12-07 15:48 logfile
> -rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack

That one is the executible, right? Doesn't look right.
The entire directory should be owned by a games group, the
directory itself "." should have group write for that
group, and the executible should be setgid. All of this
should be described in README.linux and it should be
covered by doing a "make install" as root or whatever
RPM extraction that is equivalent is.

> drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
>
> > There is probably a fair number of files there that are preventing your
> > normal user account from starting up because they exist.

And that one will prevent save. It should have group
write, be owned by the same group as the executible,
and the executible should have setgid.

If you are the only user, make the tree owned by your
account and it will solve the problem for that one
account only without setgid.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Longfellow wrote:

> On 2005-06-26, Longfellow <not@this.address> wrote:
>> On 2005-06-26, Ken Cuvelier <kvcflameNO@SPAMyahoo.com> wrote:
>>> Longfellow wrote:
>>>> Decided to try Nethack. Downloaded the linux binary and launched it.
>>>> Interesting, but obviously I needed to learn a bit. Anyway, I had
>>>> several terminals open and clicked the wrong one closed... the one
>>>> with nethack running.
> <snip>
>
> Got it fixed. The problem was that the directory
> /usr/games/lib/nethackdir permissions were 2755 instead of 2775. Group
> write was prohibited, causing the access error.
>
> Thanks to all who responded.

I'd recommend against turning on group write for the group "users"; better
to make the executable setgid games, change the group ownership of
nethackdir and the save subdir, and make them group writeable. Then
ordinary users won't be able to muck with your installation.

--
Benjamin Lewis

"Love is a snowmobile racing across the tundra and then suddenly it flips
over, pinning you underneath. At night, the ice weasels come."
--Matt Groening
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Janis Papanagnou wrote:

> Benjamin Lewis wrote:
>> Longfellow wrote:
>>
>>> [root@alpha /usr/games/lib/nethackdir]# ls -l
>>> total 2980
>>> -rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
>>> drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
>> You should probably do something like
>> chown root:games *
>
> chown games:games *

If you like, but why not root for a setgid installation?

--
Benjamin Lewis

"Love is a snowmobile racing across the tundra and then suddenly it flips
over, pinning you underneath. At night, the ice weasels come."
--Matt Groening
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Benjamin Lewis wrote:
> Janis Papanagnou wrote:
> > Benjamin Lewis wrote:
> >> Longfellow wrote:
>
> >>> [root@alpha /usr/games/lib/nethackdir]# ls -l
> >>> total 2980
> >>> -rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
> >>> drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
>
> >> You should probably do something like
> >> chown root:games *
>
> > chown games:games *
>
> If you like, but why not root for a setgid installation?

If you have games as a valid login account in addition to
a group, you can login as games and do the entire installation
after root creates /usr/games/lib/nethackdir. That account
instead of root can be used for future releases as well.
On general principles avoid using root when possible. It
is a principle used by production data centers so it isn't
really needed at home, but good habits are every bit as
habit forming as bad habits.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

On 2005-06-26, Longfellow <not@this.address> wrote:
> On 2005-06-26, Ken Cuvelier <kvcflameNO@SPAMyahoo.com> wrote:
>> Longfellow wrote:
>>> Decided to try Nethack. Downloaded the linux binary and launched it.
>>> Interesting, but obviously I needed to learn a bit. Anyway, I had
>>> several terminals open and clicked the wrong one closed... the one with
>>> nethack running.
<snip>

Got it fixed. The problem was that the directory
/usr/games/lib/nethackdir permissions were 2755 instead of 2775. Group
write was prohibited, causing the access error.

Thanks to all who responded.

Longfellow
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Benjamin Lewis wrote:
> Longfellow wrote:
>
>>[root@alpha /usr/games/lib/nethackdir]# ls -l
>>total 2980
>>-rwxr-xr-x 1 root users 1787335 2003-12-07 15:48 nethack
>>drwxr-xr-x 2 root users 4096 2003-12-07 15:48 save
>
> You should probably do something like
>
> chown root:games *

chown games:games *

> chmod g+s nethack recover
> chmod g+w save
>
> from this directory (and change group ownership of any files in the save
> directory as well). This assumes you have a "games" group on your system,
> but if you don't you can make one.

Janis
 

Chuck

Distinguished
Nov 19, 2001
1,479
0
19,280
Archived from groups: rec.games.roguelike.nethack (More info?)

> /dev/hda9 4956284 3674536 1025916 79% /
>
> Ummm... it said: "No write permission to lock perm!". Think that means
> "no write permission", not "...write lock".
a LOT of people get those messages wrong, so that's why I assumed that
message.


> I've run Slackware for years, so understand something of file
> parameters. It's not a good idea to change *system* file parameters, as
What system file parameters? /tmp if that's what you mean can ALWAYS be
safely cleaned out as long as you aren't copying files or running X at that
moment.

> that can result in system malfunction. Otherwise, keep track of what
> you change, etc...

BTW I personally have run slackware since 1994 And compiled everything from
nethack to all of KDE...

You ARE compiling/installing as root right?