ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to Read and write file created by mqm user in MB

Post new topic  Reply to topic
 How to Read and write file created by mqm user in MB « View previous topic :: View next topic » 
Author Message
shammi80
PostPosted: Wed Mar 28, 2012 11:30 am    Post subject: How to Read and write file created by mqm user in MB Reply with quote

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
View user's profile Send private message
mapa
PostPosted: Wed Mar 28, 2012 11:35 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Wed Mar 28, 2012 11:36 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You need to talk to your systems administrator about umask.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Mar 28, 2012 11:36 am    Post subject: Re: How to Read and write file created by mqm user in MB Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 28, 2012 11:36 am    Post subject: Reply with quote

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
View user's profile Send private message
shammi80
PostPosted: Wed Mar 28, 2012 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Wed Mar 28, 2012 11:38 am    Post subject: Reply with quote

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
View user's profile Send private message
mapa
PostPosted: Wed Mar 28, 2012 11:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Mar 28, 2012 11:40 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 28, 2012 11:42 am    Post subject: Reply with quote

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
View user's profile Send private message
shammi80
PostPosted: Wed Mar 28, 2012 12:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
mapa
PostPosted: Wed Mar 28, 2012 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to Read and write file created by mqm user in MB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.