shak's Help 

  1. System Concepts
  2. Managing Programming Contests
  3. Mooshak interfaces
  4. Frequently asked questions
    1. Setup and initial testing
    2. Contest configuration
    3. Evaluating submissions
    4. Email registration

Setup and initial testes FAQ

  • How do I configure Mooshak with SELinux
  • Restrictions enforced by SELinux are registered in a log file, suc as /var/log/audit/audit.log. Using the tools audit2why and audit2allow you can analyze and create a module with a security policy that can be added with the command line:
     semodule –i 
    Here is a policy file for Mooshak
    module mooshak 1.0;
    
     
    
    require {
    
        type home_root_t;
    
        type httpd_sys_script_t;
    
        class file { setattr read create ioctl write getattr unlink open append };
    
        class dir { setattr read create write rmdir remove_name open add_name };
    
    }
    
    #============= httpd_sys_script_t ==============
    
    allow httpd_sys_script_t home_root_t:dir { setattr read create write rmdir remove_name open add_name };
    
    allow httpd_sys_script_t home_root_t:file { setattr read create
    getattr write ioctl unlink open append };
    
    
    (Answer contributed by David Carvalho - david@di.ubi.pt)
  • I get a server error after accessing Mooshak's initial page
  • This probably means that your Apache configuration does not support a /cgi-bin/ directory for users. To allow programs to be executed in this directory you should include these lines in the Apache configuration file e restart the server.
    <Directory /home/*/public_html/cgi-bin>
         Options +ExecCGI -Includes -Indexes
         SetHandler cgi-script
    </Directory>
    
  • When I use the save command in the admin's screen I get an error message
  • Mooshak's scripts and data files are installed in a certain OS user's home - by default mooshak - and the CGI scripts should run with the same user. The suexec module of Apache runs CGI scripts in users directories as the corresponding and ensures that scripts cannot be invoked by other users. Mooshak expects suexec in order to run properly.

    If you have this kind of error then you probably don't have suexec installed. Some distributions install suexec by default when you install Apache. Sometimes you may need to recompile Apache with a certain configuration

    Of course that you can just give all permissions to all data files by executing chmod -R 777 data command in Mooshak's home directory but I advise you against it. You will be compromising your contest security.

  • I am using Fedora Core 3 and when Mooshak calls gcc to compile C/C++ programs it produces either Internal Error or SegFault, but the programs compile on the shell
  • People using Mooshak reported that starting Apache in init.d, i.e., httpd start, intead of startssl solved this problem. Apparently this script sets important environment variables