You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
fix non-root fstab permission issue
This commit is contained in:
@ -8541,6 +8541,9 @@ namespace oam
|
||||
writeLog("updateFstab called: " + device + ":" + dbrootID, LOG_TYPE_DEBUG );
|
||||
|
||||
//check if entry already exist
|
||||
int user;
|
||||
user = getuid();
|
||||
|
||||
string cmd;
|
||||
if (user == 0)
|
||||
cmd = "grep /data" + dbrootID + " /etc/fstab > /dev/null 2>&1";
|
||||
@ -8555,9 +8558,6 @@ namespace oam
|
||||
string entry = device + " " + InstallDir + "/data" + dbrootID + " ext2 noatime,nodiratime,noauto 0 0";
|
||||
|
||||
//update local fstab
|
||||
int user;
|
||||
user = getuid();
|
||||
|
||||
if (user == 0)
|
||||
cmd = "echo " + entry + " >> /etc/fstab";
|
||||
else
|
||||
|
Reference in New Issue
Block a user