Author |
Message
|
shammi80 |
Posted: Wed Mar 28, 2012 11:30 am Post subject: How to Read and write file created by mqm user in MB |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
Hi,
I have message broker 7 version.In the end of my flow the fileoutput node put the file in the linux directory as shown below.
-rw-rw---- 1 mqm mqm 3592 2012-03-28 13:33 148029_PCEXT_20120328-173021.DAT
I have created the scripts as ROOT user which will read and do some calculation on the files and after everthing is done remove the file.
Problem
I am getting a read permisions denied message ..
Could any one give me some pointer on the same. |
|
Back to top |
|
 |
mapa |
Posted: Wed Mar 28, 2012 11:35 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
With those permissions only users in the others category will get read access denied. You created the scripts as root, but how do you run them?
(Hint, you don't try to read the file as root)
Last edited by mapa on Wed Mar 28, 2012 11:38 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 28, 2012 11:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You need to talk to your systems administrator about umask. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 28, 2012 11:36 am Post subject: Re: How to Read and write file created by mqm user in MB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
shammi80 wrote: |
Could any one give me some pointer on the same. |
Don't run WMB with the mqm user. Not causing this problem, but it's a problem.
Ask your UNIX sys admin what the umask command does. Stand out of arm's reach when you tell him you're running scripts as root. _________________ Honesty is the best policy.
Insanity is the best defence.
Last edited by Vitor on Wed Mar 28, 2012 11:37 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 28, 2012 11:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mapa wrote: |
With those permissions only users in the others category will get read access. |
That's entirely false. |
|
Back to top |
|
 |
shammi80 |
Posted: Wed Mar 28, 2012 11:37 am Post subject: |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
I have created the script as a ROOT , But it is not able to read from the file.
Do in i need to create the scripts as MQM user. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 28, 2012 11:38 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mapa wrote: |
With those permissions only users in the others category will get read access. |
No they won't. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mapa |
Posted: Wed Mar 28, 2012 11:39 am Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
Read access denied of course, couldn't amend the post fast enough... |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 28, 2012 11:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
shammi80 wrote: |
I have created the script as a ROOT , But it is not able to read from the file. |
Creating the scripts is irrelevant. The user that's running the scripts is the important point.
shammi80 wrote: |
Do in i need to create the scripts as MQM user. |
No, you need to run the scripts as an appropriate user. Your sys admin should be very upset if you run them as root, you should be very upset if you run them as mqm.
What you should do is have the files created with the correct permissions so that whatever user is running these scripts has the needed permissions on these files.
This is Unix 101. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 28, 2012 11:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shammi80 wrote: |
I have created the script as a ROOT , But it is not able to read from the file.
Do in i need to create the scripts as MQM user. |
No.
You NEED to TALK to your SYSTEMS ADMINISTRATOR about UMASK.
Or you need to read about the command yourself.
Or you need to read about the command 'chown' or 'chmod' and then spend a lot of time handling things yourself.
You also need to create a new user that is not the mqm user and use it to issue mqsistart, instead of using the mqm user to issue mqsistart.
Unless you're using an MQ Service to start the Broker. |
|
Back to top |
|
 |
shammi80 |
Posted: Wed Mar 28, 2012 12:50 pm Post subject: |
|
|
Apprentice
Joined: 17 Feb 2012 Posts: 32
|
I have tried to create the scripts as Mqm user but not able to read the file .Permission denied. |
|
Back to top |
|
 |
mapa |
Posted: Wed Mar 28, 2012 1:37 pm Post subject: |
|
|
 Master
Joined: 09 Aug 2001 Posts: 257 Location: Malmö, Sweden
|
As mentioned, you need to obtain some basic Linux knowledge, here is one suggestion of a tutorial for you:
Linux File Permissions |
|
Back to top |
|
 |
|