cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with operating system command on receiver file adpater

Former Member
0 Kudos

Hi experts,

I am working on PI configuration from XML to CSV and everything is working fine so far and just got a new reuirement that target system was not able to pick up csv file because it is read only so I have to change file permissions on csv file on target system to "read & write" (UNix want PI to handle this). I have done extensive research on SDN form the past 4 hours, found lot of information, created shell script(we have UNIX operating system), passed command on "operating system command after message processing" on receiver channel and it i still not working and stcuk again. I use FTP on receiver channel to write file to target location. For example my PI is on server1 and I had to ftp the csv file to server2.

Here are the details:

Code in my script file (I wrote this script by doing research as I don't know much about unix commands). Here I am writing script to change permissions on target csv file from read to "read & write".

Batch.sh

#!/bin/ksh

open (ip address of target ftp server)

username

password

cd /home/sapdata/CLM/Upload/

chmod 660 CLM_ORG_*

This is what I am passing on command line for "run opearting system command after message processing".

sh /home/sapdata/tmp/Batch.sh %F

I have shell script residing on the path above on same server where PI is.

When I looked at message log after process, it is saying operating system command has been processed successfully but target csv file still has read only mode! conversion was successful but OS command is not working! Any feedback woul dbe greatly appreciated.

Thanks.

Mithun

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the reply. I tried both "chmod 777 filename" and "chmod 777 filename > output.txt" but it did not work and the csv file in target directory still stays as "read" only! Would it be possible that there could be authorization issue with the ftp user that I am logging in with? I am not sure what else to try! Please let me know if you have any more information.

Thanks.

--Mithun

Former Member
0 Kudos

yes..its quite possible..please check with your user administrator/ BASIS guy once..

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>I am not sure what else to try!

Manually ftp using the same user and check whether you are able to edit (write) or create files in that directory.

Make sure one more time that sxmb_moni and file reciever adapter cc does not show any errors.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Use chmod 777 filename

Former Member
0 Kudos

Try chmod 777 filename > output.txt

Above will execute the command chmod and output will be written to Output.txt file. If you have any kind of error, then you can find that in Output.txt file.