[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3505.0. "Sema Group s.a.e. - Division Telecom - Point 26220" by RDGENG::ASAP () Fri Apr 18 1997 06:58

    Company Name :  Sema Group s.a.e. - Division Telecom - Point 26220
    Contact Name :  Eugenio Montero
    Phone        :  34-1-3272828
    Fax          :   34-1-7543252
    Email        :  
    Date/Time in :  18-APR-1997 10:57:41
    Entered by   :  John Wood
    SPE center   :  REO

    Category     :  vms
    OS Version   :  7.1
    System H/W   :  


    Brief Description of Problem:
    -----------------------------

From:	RDGENG::MRGATE::"RDGMTS::PMDF::mail.dec.com::MaycockG" 18-APR-1997 09:19:13.25
To:	RDGENG::ASAP
CC:	
Subj:	ESCALATION: POINT  , Company  TO ASAP READING:

From:	NAME: Grainne Maycock <[email protected]@PMDF@INTERNET>
To:	NAME: '[email protected]' <IMCEAX400-c=US+3Ba=+20+3Bp=DIGITAL+3Bo=SBUEURMFG+3Bdda+3ASMTP=asap+40reo+2Emts+2Edec+2Ecom+3B@mail.dec.com@PMDF@INTERNET>
CC:	NAME: '[email protected]' <IMCEAX400-c=US+3Ba=+20+3Bp=DIGITAL+3Bo=SBUEURMFG+3Bdda+3ASMTP=asap+5Feuro+40mail+2Edec+2Ecom+3B@mail.dec.com@PMDF@INTERNET>

Hello -

Could you help with the following ASAP members' query, please ?


POINT Log Number	 #26220
Company Name 	Sema Group
Engineers name		Eugenio Montero
Telephone Number 	34-1-3272828 	
Fax Number		34-1-7543252
E-mail Address		?

Operating System, 	Version OVMS 7.1	 POSIX 3.0
Platform		Alpha 	4000	

Problem Statement		

ASAP Member programming queues problem :

We are programming an an Alpha 4000 using POSIX v3.0 on VMS 7.1.  As 
you can see from the file that accompanies this mail {C file}
we are trying to create a Queue using the mq_open command.  What we 
are trying to do is to create a queue that can contain more than the 
200 default limit of messages and also to be able to increase the 
default size {currently 100k}.

Every time we run the program we get error 13 "permission denied".

Thank you in advance for your help.

Regards,

Eugenio Montero
ASAP member
Eugenio Montero
Sema Group s.a.e. - Division Telecom
c/ Albarracin n� 25
28037 Madrid
Tlf : 34-1-3272828 - Fax : 34-1-7543252
 






In replying, please use [email protected]

Gr�inne Maycock
Technical Support Specialist
Digital Equipment Corporation
For technical queries : [email protected]





Date:	18-Apr-1997
Unable to convert to ASCII data of type FOREIGN



Date:	18-Apr-1997
Posted-date: 18-Apr-1997

RFC-822-headers:
Received: from reoexc1.reo.dec.com by rg71rw.reo.dec.com (PMDF V5.0-7 #15552)
 id <[email protected]> for [email protected]; Fri,
 18 Apr 1997 09:09:45 +0100
Received: by reoexc1.reo.dec.com with SMTP
 (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63)
 id <[email protected]>; Fri, 18 Apr 1997 09:12:14 +0100
X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
T.RTitleUserPersonal
Name
DateLines
3505.1KZIN::HUDSONThat&#039;s what I thinkFri Apr 18 1997 10:01177
From:	WATNOW::"[email protected]" 18-APR-1997
13:51:50.41
To:	[email protected]
CC:	
Subj:	RE : POINT #26220 Sema Madrid C file attachment


--Boundary (ID 1WZuLhtuXDLhtt4Ykn9o1Q)
Content-type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-transfer-encoding: QUOTED-PRINTABLE

Hi Nick :

Following our telephone conversation here is the original email with =
file
attached!

Regards,

Gr=E1inne Maycock
[email protected]
822 4360



--Boundary (ID 1WZuLhtuXDLhtt4Ykn9o1Q)
Content-type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-transfer-encoding: QUOTED-PRINTABLE

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <errno.h>

#include <mqueue.h>



main()

{

 =20

  char queue_name[100];

 =20

  mqd_t queueCD_ID;



  int   result;

  int   fd;



  struct mq_attr mqstat;

  struct mq_attr omqstat;

 =20

  strcpy (queue_name, "/mediadkb0/usuarios/guiller/pruebas/capture_q"=
);



/**********************

  fd =3D open (queue_name, O_WRONLY|O_CREAT, 0220);

  if ( fd =3D=3D -1 )

  {

    fprintf (stderr, "OPEN: %d\n", errno);

    perror ("open ");

    exit(1);=20

  }

**********************/



  memset (&mqstat, 0, sizeof (struct mq_attr));



  mqstat.mq_maxmsg =3D 200;

  mqstat.mq_msgsize =3D 200;



  queueCD_ID =3D mq_open (queue_name, O_RDWR|O_CREAT, 0666, NULL);

  if ( queueCD_ID =3D=3D (mqd_t)-1 )

  {

    fprintf (stderr, "MQ_OPEN: %d\n", errno);

    perror ("mq_open ");

    exit(1);=20

  }



  memset (&mqstat, 0, sizeof (struct mq_attr));

  result =3D mq_getattr (queueCD_ID, &mqstat);

  if ( result =3D=3D -1 )

  {

    fprintf (stderr, "MQ_GETATTR: %d\n", errno);

    exit(1);=20

  }



  memset (&omqstat, 0, sizeof (struct mq_attr));

  memcpy (&omqstat, &mqstat, sizeof (struct mq_attr));



  omqstat.mq_maxmsg =3D 400;

  result =3D mq_setattr (queueCD_ID, &mqstat, &omqstat);

  if ( result =3D=3D -1 )

  {

    fprintf (stderr, "MQ_SETATTR: %d\n", errno);

    exit(1);=20

  }



  memset (&mqstat, 0, sizeof (struct mq_attr));

  result =3D mq_getattr (queueCD_ID, &mqstat);

  if ( result =3D=3D -1 )

  {

    fprintf (stderr, "MQ_GETATTR: %d\n", errno);

    exit(1);=20

  }

  exit (0);

}



--Boundary (ID 1WZuLhtuXDLhtt4Ykn9o1Q)--
3505.2KZIN::HUDSONThat&#039;s what I thinkTue Apr 22 1997 06:006
spoke with cust.  Said I think the error he's getting is because he's
specifying invalid path name in mq_open() call.  I.e. when I use his
program I get error 13, but if I specify "/tmp/queuename" then it doesn't
fail.

he's going to have a try and get back to me
3505.3KZIN::HUDSONThat&#039;s what I thinkTue Apr 22 1997 11:4942
From:	WATNOW::"[email protected]" 22-APR-1997 15:47:02.16
To:	"'[email protected]'" <[email protected]>
CC:	
Subj:	privileges

Dear Nick.

I have been testing the program colas.c.

1) I have that queue_name =3D /mediadkb0/usuarios/eugenio/queue_name

When I run the program I have always the errno 13 (using the accounts =
eugenio and system).

If I run the program colas.c using a sentence open instead of mq_open, I =
do not have the error. (So with open the privileges are ok, but with =
mq_open the privileges are not ok).

If I have that queue_name =3D /tmp/queue_name

When I run the program with the system account, the program works. If I =
do this with my account (eugenio), the program does not work (errno 13).

I send you the privileges I have in the directories I have been testing. =
Probably you can see something is wrong.

lr-xr-xr-x 1 system system tmp->/cont/MEDIA_tmp
drwxrwxrwx 10 system system cont
drwxrwxrwx 4 system system MEDIA_tmp

drwxrwxrwx 2 65793 65537 mediadkb0
drwxrwxrwx 2 65793 65537 usuarios
drwxrwxrwx 2 eugenio 65600 eugenio

Thanks a lot.

Eugenio Montero
Sema Group s.a.e - Division Telecom
c/ Albarracin 25. 28010 Madrid. Spain
tlf : 34-1-3272828 fax : 34-1-7543253


3505.4KZIN::HUDSONThat&#039;s what I thinkThu Apr 24 1997 05:2213
From:	DEC:.REO.REOVTX::HUDSON       "[email protected] - UK Software
Partner Engineering 830-4121" 24-APR-1997 09:21:09.45
To:	nm%WATNOW::"[email protected]"
CC:	HUDSON
Subj:	RE: privileges

Hello Eugenio Montero

Just to let you know I received your mail message with the extra info, and I'm
looking into it.

Regards
nick
3505.5KZIN::HUDSONThat&#039;s what I thinkFri Apr 25 1997 12:3568
From:	DEC:.REO.REOVTX::HUDSON       "[email protected] - UK Software
Partner Engineering 830-4121" 25-APR-1997 16:34:41.81
To:	nm%WATNOW::"[email protected]"
CC:	HUDSON
Subj:	RE: privileges

Hello Eugenio

I don't know why you are seeing this problem, I seem to have the same settings
as you.  This is a log of my session below, containing a smaller version of the
program you sent, and display of the directory protections.  Perhaps you could
try this little one and tell me what happens?


psx> ls -l /tmp/capture_q
ls: File or directory "/tmp/capture_q" is not found
psx> cat prog1.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <mqueue.h>

main(int argc, char *argv[])
{
  
  char queue_name[100];
  
  mqd_t queueCD_ID;
  
  strcpy (queue_name, "/tmp/capture_q");

  queueCD_ID = mq_open (queue_name, O_RDWR|O_CREAT, 0666, NULL);
  printf("queue_CD_ID is %d\n",queueCD_ID);
  if ( queueCD_ID == (mqd_t)-1 )
  {
    fprintf (stderr, "MQ_OPEN: %d\n", errno);
    perror ("mq_open ");
    exit(1); 
  }
  exit(1);
}

psx> cc prog1.c
psx> a.out
queue_CD_ID is 3
psx> ls -l /tmp/capture_q
xrw-rw-rw-   1 hudson   system         0 Apr 25 16:29 /tmp/capture_q
psx> ls -l /tmp
lr-xr-xr-x   1 system   system        16 Jan  1  1970 /tmp -> /cont/SPEAXP_tmp
psx> ls -l /cont
total 32
drwxrwxrwx   2 system   system      1915 Mar 21  1996 SPEAXP_dev
drwxrwxrwx   4 wood_j   system      1915 Apr 25 16:29 SPEAXP_tmp
drwxr-xr-x   2 system   system      1915 Mar 21  1996 bin
drwxr-xr-x   2 system   system      1915 Mar 21  1996 dev
drwxr-xr-x   2 system   system      1915 Sep 12  1996 etc
drwxr-xr-x   2 system   system      1915 Mar 21  1996 lib
drwxr-xr-x   2 system   system      1915 Mar 21 15:36 tmp
drwxr-xr-x   9 system   system      1915 Mar 21 15:36 usr
psx> ls -l /cont/SPEAXP_tmp
total 8
xrw-rw-rw-   1 hudson   system         0 Apr 25 16:29 capture_q
drwxrwxrwx   2 wood_j   system      1915 Mar 21 15:36 msg
drwxrwxrwx   2 wood_j   system      1915 Mar 21 15:36 shm
psx> exit