I'm trying to call a compiled Matlab executable from Omero server using Python script service.
In my Python script, I use the fucntion:
- Code: Select all
subprocess.Popen(['/home/yuh5/Desktop/magicsquare/for_testing/magicsquare', '5'])
However, I got error:
- Code: Select all
omero script launch 354
Using session 869c89d4-c0a5-44a1-9205-6aa49a300d47 (yuh5@localhost:4064). Idle timeout: 10 min. Current group: system
Enter value for "IDs": 1
Job 311 ready
Waiting....
Callback received: FINISHED
*** start stdout (id=361)***
* Color of each channel:
*
*** end stdout ***
*** start stderr (id=362)***
* Traceback (most recent call last):
* File "./script", line 122, in <module>
* run_script()
* File "./script", line 100, in run_script
* subprocess.Popen(['/home/yuh5/Desktop/magicsquare/for_testing/magicsquare', '5'])
* File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
* errread, errwrite)
* File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
* raise child_exception
* OSError: [Errno 13] Permission denied
*
*** end stderr ***
*** out parameters ***
*** done ***
I'm sure I have the permission to execute file under that path. And I was able to run that executable with:
- Code: Select all
omero@ceb-cad2:/usr/local/MATLAB$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.Popen(['/home/yuh5/Desktop/magicsquare/for_testing/magicsquare', '5'])
<subprocess.Popen object at 0x7f879a9f8f90>
>>>
m =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
FYI:
ceb-cad2 is my Linux server. Omero.server is installed on ceb-cad2. Matlab executable is placed under ~/Desktop/ on ceb-cad2.
1. Do y'all know why I get this error?
2. When I call: "omero script launch...", what group is this executed under? Root? my user account on the Linux machine? or Omero?