Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-11-2019 11:31 AM
Hi,
I'm trying to create a local file for writing and looks like I don't have a permission to do so.
I'm using custom created account but with admin privleges.
Is there any place in EXOS filesystem with write permissions?
I'm trying to create a local file for writing and looks like I don't have a permission to do so.
I'm using custom created account but with admin privleges.
Is there any place in EXOS filesystem with write permissions?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-11-2019 03:40 PM
You can use the open() function. I am using an admin account called pythonuser and running a pythong script that creates a file called thisFileWasCreatedWithPython.log.
I have RW permissions on the file after running my script:
What version of EXOS are you using and can if you try the using the above in your script are you running into the same read only permission problem?
code:
fileName = "thisFileWasCreatedWithPython"
f = open('/usr/local/cfg/' + fileName + '.log', 'a')
I have RW permissions on the file after running my script:
code:
# ls *.log
-rw-r--r-- 1 admin admin 241770 Apr 11 21:29 thisFileWasCreatedWithPython.log
What version of EXOS are you using and can if you try the using the above in your script are you running into the same read only permission problem?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-12-2019 06:44 AM
Dunno why but I tried to create a file in /usr/local/cfg before and couldn't. I also tried at /usr/local/tmp but that didn't work either. Finally, I did it like this at /usr/local/cfg:
with open('test.xsf','w') as f:
f.write('something to file')
Thanks 
with open('test.xsf','w') as f:
f.write('something to file')
Thanks 
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎04-11-2019 03:40 PM
You can use the open() function. I am using an admin account called pythonuser and running a pythong script that creates a file called thisFileWasCreatedWithPython.log.
I have RW permissions on the file after running my script:
What version of EXOS are you using and can if you try the using the above in your script are you running into the same read only permission problem?
code:
fileName = "thisFileWasCreatedWithPython"
f = open('/usr/local/cfg/' + fileName + '.log', 'a')
I have RW permissions on the file after running my script:
code:
# ls *.log
-rw-r--r-- 1 admin admin 241770 Apr 11 21:29 thisFileWasCreatedWithPython.log
What version of EXOS are you using and can if you try the using the above in your script are you running into the same read only permission problem?
