Hi guys, it’s from a few days already I try to fix this error, but I don’t see the problem (I am not expert of the use of find command with bash). Basically, when I run this function I get this error: Missing argument to exec’
The function:
# Internal use only
def prepareRootPermissions
#We need to exclude the ism tree and any running task to avoid crashs and unwanted permissions
command = <<-COMMAND
find #{Ism.settings.rootPath} \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::TemporaryDirectory}.ISM.*' \
! -path '#{Ism.settings.rootPath}#{Ism.settings.sourcesPath}' \
! -path '#{Ism.settings.rootPath}#{Ism.settings.toolsPath}' \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::RuntimeDataDirectory}' \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::TemporaryDirectory}' \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::SettingsDirectory}' \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::LogsDirectory}' \
! -path '#{Ism.settings.rootPath}#{ISM::Default::Path::LibraryDirectory}' \
-exec chown root:root '{}' \;
COMMAND
ISM::Core.runSystemCommand( command: command,
asRoot: true,
viaChroot: false)
rescue exception
ISM::Core::Error.show( className: "Software",
functionName: "prepareRootPermissions",
errorTitle: "Execution failure",
error: "Failed to execute the function",
exception: exception)
end