Directory Settings
Manage the startup users, running directories, and log directories of VM-deployed components. You can view the default directory rules of the system or customize directory rules.
The default system directory is the default path provided by the system for component deployment and log directories. The default startup user and user who can access the component deployment and log directories are www, and the default user group is www. For details, see Viewing the Default System Directory.
If the default system directory does not meet your service requirements, you can customize the system directory. For details, see Customizing a System Directory.
Viewing the Default System Directory
- Log in to ServiceStage.
- Choose System Settings > Directory Settings. The Directory Settings page is displayed.
- Click the Default System Directory tab and view the default system directory settings. For details, see Table 1.
Table 1 Default system directory configuration Parameter
Description
Deployment Directory
- Path: parent directory of the component deployment path. The default value is /opt/application, and the absolute deployment path of the component is /opt/application/${Component instance name excluding the five random characters generated by the system}}/${Component version}/${Component instance ID}.
For example, if the component instance name is comp-ecs-env-cce_8DGO1, the component version number is 2025.0520.19070, and the component instance ID is 41a71313-46a4-411e-9eb5-388b16c9de3a, the absolute deployment path is /opt/application/comp-ecs-env-cce/2025.0520.19070/41a71313-46a4-411e-9eb5-388b16c9de3a. For details about the component instance name, see Context.
- User:User Group: owner and group of the files in the component deployment directory. The default values are www and www, indicating that the file owner is the www user and the group to which the file belongs is the www group.
- Permissions: access permissions on the files in the component deployment directory. The default value is 751, indicating that the file owner (www) has the read, write, and execute permissions (rwx), the group to which the file belongs (www) has the read and execute permissions (rx), and other users have the execute permission (x).
Log Directory
- Path: parent directory for storing component running logs. The default value is /var/log/application, and the absolute path is /var/log/application/${Component instance name excluding the five random characters generated by the system}/${Component instance ID}.
For example, if the component instance name is comp-ecs-env-cce_8DGO1, and the component instance ID is 41a71313-46a4-411e-9eb5-388b16c9de3a, the absolute storage path is /opt/application/comp-ecs-env-cce/41a71313-46a4-411e-9eb5-388b16c9de3a. For details about the component instance name, see Context.
- User:User Group: owner and group of the files in the component log directory. The default values are www and www, indicating that the file owner is the www user and the group to which the file belongs is the www group.
- Permissions: access permissions on the files in the component log directory. The default value is 751, indicating that the file owner (www) has the read, write, and execute permissions (rwx), the group to which the file belongs (www) has the read and execute permissions (rx), and other users have the execute permission (x).
Running User
Component startup user. The default value is www.
- Path: parent directory of the component deployment path. The default value is /opt/application, and the absolute deployment path of the component is /opt/application/${Component instance name excluding the five random characters generated by the system}}/${Component version}/${Component instance ID}.
Customizing a System Directory
- Log in to ServiceStage.
- Choose System Settings > Directory Settings. The Directory Settings page is displayed.
- Click the Custom System Directory tab and configure the custom system directory by referring to Table 2.
- Set unique deployment directory for each component.
- Running users cann be changed in directory settings due to component upgrades.
- For servers with a custom system directory, the VM agent version must be 1.3.121 or later.
- If the custom directory does not exist, ensure that the running user has the permission to create the custom directory.
When the sudo command that does not match that in the /etc/sudoers file cannot be used on the server where the component is deployed, and you use a custom user (for example, appuser) to create a component in the deployment directory (for example, /opt/test), ensure that this user has the permission to create directories in the /opt directory. You can run the following commands to grant the permission:
sudo setfacl -m u:appuser:rwx /opt sudo setfacl -R -m u:appuser:rwx /opt
Table 2 Custom system directory settings Parameter
Description
Running User
Component startup user.
If you use a custom user, ensure that it has been created on the server where the component is running.
Deployment Directory
- Path: component deployment path.
For example, change it to /opt/app. Then, select Use default system directory for Directory Configuration Mode in Configuring Directory Settings. The absolute deployment path of the component is /opt/app/${Component instance name excluding the five random characters generated by the system}/${Component version number}/${Component instance ID}/.
For example, if the component instance name is comp-ecs-env-cce_8DGO1, the component version number is 2025.0520.19070, and the component instance ID is 41a71313-46a4-411e-9eb5-388b16c9de3a, the absolute deployment path is /opt/app/comp-ecs-env-cce/2025.0520.19070/41a71313-46a4-411e-9eb5-388b16c9de3a/. For details about the component instance name, see Context.
- User:User Group: owner and group of the files in the component deployment directory.
User is the Running User you entered.
If you customize a User Group, ensure that it has been created on the server where the component is running.
- Permissions: access permissions on the files in the component deployment directory. The value consists of three digits and ranges from 001 to 777.
It defines the access permissions of the file owner, file group, and other users.
Log Directory
- Path: path for storing component running logs.
For example, change it to /var/log/app. Then, select Use default system directory for Directory Configuration Mode in Configuring Directory Settings. The absolute storage path is /var/log/app/${Component instance name excluding the five random characters generated by the system}/${Component instance ID}.
For example, if the component instance name is comp-ecs-env-cce_8DGO1, and the component instance ID is 41a71313-46a4-411e-9eb5-388b16c9de3a, the absolute storage path is /opt/app/comp-ecs-env-cce/41a71313-46a4-411e-9eb5-388b16c9de3a/. For details about the component instance name, see Context.
- User:User Group: owner and group of the files in the component log directory.
User is the Running User you entered.
If you customize a User Group, ensure that it has been created on the server where the component is running.
- Permissions: access permissions on the files in the component log directory. The value consists of three digits and ranges from 001 to 777.
It defines the access permissions of the file owner, file group, and other users.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot