Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buster problem #1

Closed
maxmasetti opened this issue Aug 26, 2019 · 4 comments
Closed

buster problem #1

maxmasetti opened this issue Aug 26, 2019 · 4 comments

Comments

@maxmasetti
Copy link

hi,
I'm running jobeinabox in a debian buster host and a strange error of permission arise:

Syntax Error(s)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/py_compile.py", line 186, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/py_compile.py", line 178, in main
    compile(filename, doraise=True)
  File "/usr/lib/python3.6/py_compile.py", line 136, in compile
    os.makedirs(dirname)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '__pycache__'

same for C program: linker can't write output file.
same box running in test environment on my macos mojave gives no problems.
could you help me?
max

@maxmasetti
Copy link
Author

I dig some around this problem and found a solution: set the executor to run as group www-data.
I changed in file application/libraries/LanguageTask.php from

         $sandboxCommandBits = array(
                 "sudo " . dirname(__FILE__)  . "/../../runguard/runguard",
                 "--user={$this->user}",
                 "--group=jobe",
                 "--time=$cputime",         // Seconds of execution time allowed
                 "--filesize=$filesize",    // Max file sizes
                 "--nproc=$numProcs",       // Max num processes/threads for this *user*

to

         $sandboxCommandBits = array(
                 "sudo " . dirname(__FILE__)  . "/../../runguard/runguard",
                 "--user={$this->user}",
                 "--group=www-data",
                 "--time=$cputime",         // Seconds of execution time allowed
                 "--filesize=$filesize",    // Max file sizes
                 "--nproc=$numProcs",       // Max num processes/threads for this *user*

Then I set apache umask 0002 in /etc/apache2/envvars, so it can rwx group owned directories. Now Jobe server works properly.
But I suspect the problem is a malfunction of runguard program, unable to set group and user before run tests.
max

@maxmasetti
Copy link
Author

ahhh!
finally got it: upgrading host from debian jessie to debian buster the docker storage drive wasn't upgraded from aufs (deprecated) to overlay2 and the extended acl required to set permissions on files and directories didn't work. so the permission denied error.
changed the storage and recreated all the images and containers, now the jobeinabox works like a charm!
max

@trampgeek
Copy link
Owner

Thanks for reporting and solving the problem all in one smooth sequence, before I even got to looking at the first posting :)

@bdarties
Copy link

bdarties commented Sep 5, 2020

hi!

Just for the record : I encounter a similar issue when deploying jobeinabox on a QNAP NAS (everything's fine on other platforms). I also noticed user permissions differences when creating temporary directories jobe_xxxx preventing the creation of pycache.

I didn't try yet the solution proposed by maxmasetti but I also noticed the storage system was set to 'overlay' on my NAS instead of 'overlay2' on other platforms. It seems less easy to change the storage system on QNAP, as it uses a dedicated app, Container Station, which includes docker and it configuration ... I keep digging to change it but this thread brings some hope after days of failure attempts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants