Jump to content

Freddie

Members
  • Posts

    99
  • Joined

  • Last visited

Posts posted by Freddie

  1. I think it would be a good to implement a more compatible umask setting in dockers that create files on unRAID. The default umask in unRAID is 0000 which results in files with wide open permissions (directories: 0777 or drwxrwxrwx, files: 0666 or -rw-rw-rw-). In phusion/baseimage the default umask is 0022 which results in files that are only writeable by the owning user (directories: 0755 or drwxr-xr-x, files: 0644 or -rw-r--r--). These more restrictive permissions can cause problems when user share security is enabled.  Many of the applications that are run in these unRAID dockers have internal settings to control permissions, but it would be nice if we did not have to rely on all those separate internal settings.

     

    A few possible methods to implement this:

    [*]Set the umask for each application.  For example, in phusion/baseimage, a "umask 0000" command could be added to the run script that starts the application.

    [*]Set the default umask for the user nobody. I don't know to do this but it seems like a good way to go if one were to create an unRAID baseimage.

    [*]Set the default umask for all users. In ubuntu 14.04 this is done in /etc/login.defs. This seems heavy-handed; it doesn't seem like a good idea to have all files created within the container to have wide open permisions.

     

  2. The issue with cache_dirs not woking properly when invoked from the go file on unRAID v6 is due to the first few lines in the cache_dirs script:

    #!/bin/bash
    if test "$SHELL" = "/bin/sh" && test -x /bin/bash; then
        exec /bin/bash -c "$0" "$@"
    fi
    

    The SHELL environment variable starts out as "/bin/sh" and does not change when executing /bin/bash.  So it gets stuck in a loop.

     

    When invoked from a standard shell, the SHELL environment variable is "/bin/bash" and it works just fine.

     

    The test can be modified like this:

    if test "$BASH"x = "x" && test -x /bin/bash; then

    This works on unRAID 6.0-beta5a booted with Xen.  I was thinking of other required test cases, but I'm not sure what this chunk of code is supposed to be doing.  It appears to ensure the script is invoked with bash, but doesn't the first line (#!/bin/bash) do that on its own?  I would think the other three lines could just be removed.

×
×
  • Create New...