summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-01-13 11:11:33 -0500
committerimarom <imarom@cisco.com>2016-01-13 11:11:33 -0500
commit61dd670bb4b950f96002ea529235ac341c21a12e (patch)
tree169ad65aa11e1fb5916492027e3f78ee37e254c4 /scripts
parent7baa5bda9175ed515ba9507236303589cd731a56 (diff)
fixed the permission on the console directory (now creates with 777)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/automation/trex_control_plane/console/trex_console.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py
index 8c823e8c..450feb6a 100755
--- a/scripts/automation/trex_control_plane/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/console/trex_console.py
@@ -66,7 +66,14 @@ class TRexGeneralCmd(cmd.Cmd):
def save_console_history(self):
if not os.path.exists(self._history_file_dir):
- os.makedirs(self._history_file_dir)
+ # make the directory available for every user
+ try:
+ original_umask = os.umask(0)
+ os.makedirs(self._history_file_dir, mode = 0777)
+ finally:
+ os.umask(original_umask)
+
+
# os.mknod(self._history_file)
readline.write_history_file(self._history_file)
return