cancel
Showing results for 
Search instead for 
Did you mean: 

OS command error=13, Permission denied in File Adapter

Former Member
0 Kudos

Hi All,

I am trying to call the OS commands in File adaper, when i check the Audit log i am getting Error exectuting the command. the same command when i check in OS its working fine.

i have collected the debug log and i can see the message saying

Catching #1#java.io.IOException: java.io.IOException: error=13, Permission denied

at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)

at java.lang.ProcessImpl.start(ProcessImpl.java:65)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)

at java.lang.Runtime.exec(Runtime.java:591)

at java.lang.Runtime.exec(Runtime.java:429)

at java.lang.Runtime.exec(Runtime.java:326)

at com.sap.aii.af.lib.util.system.CommandLauncher.exec(CommandLauncher.java:64)

at com.sap.aii.adapter.file.util.OSCommand.exec(OSCommand.java:58)

at com.sap.aii.adapter.file.util.OSCommand.exec(OSCommand.java:33)

at com.sap.aii.adapter.file.File2XI.processFileList(File2XI.java:991)

at com.sap.aii.adapter.file.File2XI.invoke(File2XI.java:622)

at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:500)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:169)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:266)

I hope the problem with problem XI communication with OS level, Could you pls suggest me the problem?

Thanks,

Venkat

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Venkat,

did you use the same user for testing the OS command as is configured for PI? Looks like an authorization problem to me!

Regards

Sven

Former Member
0 Kudos

Hi Thx for your reply,

I hope XI will call the OS command with <SID>ADM right, you want me to try run the command with same user(<SID>ADM) ...

Thanks,

venkat

Former Member
0 Kudos

Hi Venkat,

XI will use a service user (on Windows systems this is SAPSERVICE<SID>), which doesn't have administrative rights.

Regards

Sven

0 Kudos

Hello!

You can see more information about os command using the file adapter in SAP note:

#841704 - XI File & JDBC Adapter: Operating system command

o The command line of an operating system command run through the

File and JDBC Adapter is interpreted slightly different compared

to common operating system shells. E.g. quotes and apostrophes

are handled differently. If in doubt, check if the command can be

successfully run through the Java Runtime.exec(...) API. Also

note that the command is run as user "<sid>adm" (Unix) /

"SAPService<SID>" (Windows).

Under Windows, this especially means that you cannot use any

shell commands interpreted by teh command processor (such as

"copy", "ren" or "del") using the operating system command.

Best regards,

Franklin