1
0
Fork 0

try to fix permission issues of "/var/tmp/arangod" (#4499)

This commit is contained in:
Jan Christoph Uhde 2018-02-19 18:48:59 +01:00 committed by Jan
parent c9be47d1ab
commit 2ef8bb3487
11 changed files with 22 additions and 1 deletions

View File

@ -1,6 +1,8 @@
v3.2.12 (XXXX-XX-XX)
--------------------
* fix issue #4457: create /var/tmp/arangod with correct user in supervisor mode
* fix internal issue #1848
AQL optimizer was trying to resolve attribute accesses

View File

@ -34,6 +34,9 @@ start () {
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . && chmod 700 . ) || exit 1
( cd $PIDDIR && chown arangodb:arangodb . && chmod 755 . ) || exit 1
local current=/var/tmp/arangod
( mkdir -p $current && chown -R arangodb:arangodb $current ) || exit 1
ulimit -H -n 131072 || true
ulimit -S -n 131072 || true

View File

@ -14,6 +14,9 @@ db_get @CPACK_PACKAGE_NAME@/storage_engine
STORAGE_ENGINE=$RET
export GLIBCXX_FORCE_NEW=1
current=/var/tmp/arangod
( mkdir -p $current && chown -R arangodb:arangodb $current ) || ar_err "failed to create $current"
if test -d /var/lib/arangodb3 -a ! -f /usr/sbin/arangod; then
NEW_INSTALL_EXISTING_DIR=true
else

View File

@ -32,6 +32,9 @@ start() {
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . && chmod 700 .) || ar_ferr "failed to set permissions on /var/lib/arangodb3-apps"
( cd $PIDDIR && chown arangodb:arangodb . && chmod 700 .) || ar_ferr "failed to set permissions on $PIDDIR"
local current=/var/tmp/arangod
( mkdir -p $current && chown -R arangodb:arangodb $current ) || { echo "could not create or set permissions for $current"; exit 1; }
ulimit -H -n 131072 || true
ulimit -S -n 131072 || true

View File

@ -52,6 +52,9 @@ start () {
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . && chmod 700 . ) || exit 1
( cd $PIDDIR && chown arangodb:arangodb . && chmod 700 . ) || exit 1
local current=/var/tmp/arangod
( mkdir -p $current && chown -R arangodb:arangodb $current ) || exit 1
ulimit -H -n 131072 || true
ulimit -S -n 131072 || true

View File

@ -52,6 +52,9 @@ start () {
( cd /var/lib/arangodb3-apps && chown -R arangodb:arangodb . && chmod 700 . ) || exit 1
( cd $PIDDIR && chown arangodb:arangodb . && chmod 700 . ) || exit 1
local current=/var/tmp/arangod
( mkdir -p $current && chown -R arangodb:arangodb $current ) || exit 1
ulimit -H -n 131072 || true
ulimit -S -n 131072 || true

View File

@ -61,6 +61,7 @@ ServerFeature::ServerFeature(application_features::ApplicationServer* server,
startsAfter("Upgrade");
startsAfter("V8Dealer");
startsAfter("WorkMonitor");
startsAfter("Temp");
}
void ServerFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {

View File

@ -115,6 +115,7 @@ V8DealerFeature::V8DealerFeature(
startsAfter("Scheduler");
startsAfter("V8Platform");
startsAfter("WorkMonitor");
startsAfter("Temp");
}
void V8DealerFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {

View File

@ -325,6 +325,7 @@ void ArangoGlobalContext::runStartupChecks() {
#endif
}
// This function is called at end of TempFeature::start()
void ArangoGlobalContext::createMiniDumpFilename() {
#ifdef _WIN32
miniDumpFilename = TRI_GetTempPath();

View File

@ -2027,6 +2027,7 @@ static void SystemTempPathCleaner(void) {
char* path = SystemTempPath.get();
if (path != nullptr) {
// delete directory iff directory is empty
TRI_RMDIR(path);
}
}

View File

@ -285,7 +285,7 @@ void TRI_SetApplicationName(char const*);
std::string TRI_GetTempPath();
////////////////////////////////////////////////////////////////////////////////
/// @brief get a temporary file name
/// @brief set the system's temporary path - WARN: The directory is not created
////////////////////////////////////////////////////////////////////////////////
int TRI_GetTempName(char const* directory, std::string& result, bool createFile,