我需要运行一个只能与特定用户和组一起运行的脚本。命令的格式类似于
$ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]]
我尝试将脚本作为
运行$ARTIFACTORY_HOME/bin/installService.sh root root
但是我收到以下错误
** ERROR: Only root user can install artifactory as a service
当我用sudo运行它时,我得到另一个错误
sudo $ARTIFACTORY_HOME/bin/installService.sh
** ERROR: Could not change values in /etc/init.d/artifactory
使用sudo su
执行它也会得到相同的结果。这是整个跟踪
** INFO: Please edit the files in /etc/opt/jfrog/artifactory to set the correct environment
Especially /etc/opt/jfrog/artifactory/default that defines ARTIFACTORY_HOME, JAVA_HOME and JAVA_OPTIONS
cp: /etc/init.d/artifactory: No such file or directory
chmod: /etc/init.d/artifactory: No such file or directory
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
** ERROR: Could not change values in /etc/init.d/artifactory
以root身份运行它的正确语法是什么?
文件etc / init.d / artifactory文件没有被复制的原因是什么?