Help Center/ CodeArts Deploy/ FAQs/ Command Execution for Deployment Actions/ Running Shell Commands/ A Message Indicating an Operation Failure Is Displayed
Updated on 2025-08-06 GMT+08:00

A Message Indicating an Operation Failure Is Displayed

Symptoms

A message indicating an operation failure is displayed.

Cause Analysis

Security software often considers certain commands entered in the text box, such as user information, passwords, and file system configurations, as potential information leakage risks. These commands may be intercepted by CFW. As a result, new applications fail to be created.

The following uses the shell commands as an example:

1
2
3
4
5
6
cat /etc/hosts
cat /etc/passwd
cat /etc/shadow
cat /etc/fstab
mount -l || echo hello world 
……

Solution

Solution 1: Parameterization (Use /etc/hosts as an example)

  1. Add a parameter named Path with the value /etc/hosts, as shown in the following figure.

  2. Reference the parameter Path in the Shell Commands text box.
    cat ${Path}
    cat /etc/passwd
    cat /etc/shadow
    cat /etc/fstab
    mount -l || echo hello world 
    ……
  3. If other information also needs to be parameterized, define them as other parameters for referencing following preceding steps.

Solution 2: Use the Shell Script

  1. Upload the script to CodeArts Artifact.
  2. Use the action Select Deployment Source to download the script to the target host to be deployed.
  3. Deploy the action Run Shell Script.