MathHubInfo / Legacy-localmh-docker

Legacy docker wrapper for lmh
1 stars 1 forks source link

lmh mmt permission issues #27

Open aoripov opened 8 years ago

aoripov commented 8 years ago

After running lmh mmt

Traceback (most recent call last):
  File "/path/to/localmh/bin/lmh", line 13, in <module>
    main()
  File "/path/to/localmh/bin/lmh", line 10, in main
    lmh.run(sys.argv[1:])
  File "/path/to/localmh/lmh/__init__.py", line 85, in run
    if main(argv):
  File "/path/to/localmh/lmh/__init__.py", line 79, in main
    return submods[args.action].do(args, unknown)
  File "/path/to/localmh/lmh/commands/mmt/__init__.py", line 27, in do
    return run.do(arguments, unparsed)
  File "/path/to/localmh/lmh/commands/mmt/run.py", line 5, in do
    return run(unknown)
  File "/path/to/localmh/lmh/lib/mmt.py", line 21, in run
    proc = subprocess.Popen([mmt_executable] + args, stderr=subprocess.PIPE if quiet else sys.stderr, stdout=subprocess.PIPE if quiet else sys.stdout, cwd=path)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

lmh seems to have crashed with <class 'PermissionError'>
a report will be generated in 
Error in sys.excepthook:
Traceback (most recent call last):
  File "/path/to/localmh/lmh/__init__.py", line 30, in my_excepthook
    write_file(lmh_locate("logs", time.strftime("%Y-%m-%d-%H-%M-%S.log")), s)
  File "/path/to/localmh/lmh/lib/io.py", line 163, in write_file
    text_file = open(filename, "w")
PermissionError: [Errno 13] Permission denied: '/path/to/localmh/logs/2016-02-15-16-03-37.log'

Original exception was:
Traceback (most recent call last):
  File "/path/to/localmh/bin/lmh", line 13, in <module>
    main()
  File "/path/to/localmh/bin/lmh", line 10, in main
    lmh.run(sys.argv[1:])
  File "/path/to/localmh/lmh/__init__.py", line 85, in run
    if main(argv):
  File "/path/to/localmh/lmh/__init__.py", line 79, in main
    return submods[args.action].do(args, unknown)
  File "/path/to/localmh/lmh/commands/mmt/__init__.py", line 27, in do
    return run.do(arguments, unparsed)
  File "/path/to/localmh/lmh/commands/mmt/run.py", line 5, in do
    return run(unknown)
  File "/path/to/localmh/lmh/lib/mmt.py", line 21, in run
    proc = subprocess.Popen([mmt_executable] + args, stderr=subprocess.PIPE if quiet else sys.stderr, stdout=subprocess.PIPE if quiet else sys.stdout, cwd=path)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
tkw1536 commented 8 years ago

I am aware of this issue and this is something related to running localmh_docker. I will need to try and fix this later because it works slightly differently on my mac.

m-iancu commented 8 years ago

there's another student that has the same issue. Is there a work-around ?

tkw1536 commented 8 years ago

Try

chmod +x .../ext/MMT/deploy/mmt.jar

On Mon, Feb 15, 2016, 19:26 m-iancu notifications@github.com wrote:

there's another student that has the same issue. Is there a work-around ?

— Reply to this email directly or view it on GitHub https://github.com/KWARC/localmh_docker/issues/27#issuecomment-184336101 .

m-iancu commented 8 years ago

actually, the problem is with logs, but all folders in localmh except MathHub are owned by root:root instead of user:group. It did work with docker exec \bin\bash -c "chown user:group ... " but have to do that every time lmh_docker is restarted.

tkw1536 commented 8 years ago

Yes. I probably want to move all the folders that need to be writable by the user to one common location. This is on my list of things to do.