Re: [OFF-TOPIC] File permissions

From: Jarhad Idanno (
Date: 05/08/03

--- Templar Viper <templarviper@HOTMAIL.COM> wrote:
>I'm running Circlemud 3.1 with Oasisolc, ascii player files and more on a
>redhat 8.0 machine. I have some problems with file permissions however.
>Sometimes after a copyover/reboot after a compile, the muds boots fine,
>but when I try to log in, the mud complains it can't read the player file.

Hi Templar Viper,
actually your problem has nothing to do with file permissions on your OS.  I also encountered this problem some time back.
It seems that after someone receives mail, his name in the player_table is capitalized (until now I still can't locate the code that does this), but since the name of the pfile is stored in small letters, of course the system won't be able to open the capitalized file since it doesn't exist.
My solution was rather simple.  In db.c, under load_char:

     sprintf(filename, "%s%s%c%s%s%s", PLR_PREFIX, SLASH, *player_table[id].name,
       SLASH, player_table[id].name, PLR_SUFFIX);
+      /* Try to rectify the problem first.  Perhaps name is capitalized? */
+      if (player_table[id].name[0] != LOWER(*name))
+        player_table[id].name[0] = LOWER(*name);
+      save_player_index();
+      sprintf(filename, "%s%s%c%s%s%s", PLR_PREFIX, SLASH, *player_table[id].name,
+        SLASH, player_table[id].name, PLR_SUFFIX);
     if(!(fl = fbopen(filename, FB_READ))) {
       mudlog(NRM, LVL_GOD, TRUE, "SYSERR: Couldn't open player file %s", filename);
       return (-1);

Jarhad Idanno

Play at A Merging of Fates MUD and get free E-Mail too!

Select your own custom email address for FREE! Get w/No Ads, 6MB, POP & more!

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/26/03 PDT