Web Gui access rights problem?

  • Guys,


    I need your help. I have 0.4.38 running on my Iomega CE NAS. All worked fine until I started playing with rsync. In the course of getting rsync to talk with my Windows 8 machines I played with some user settings through the Web Gui.


    Now I am left with a strange Web behavior. Some of the menus return with what seems to me permission problems:


    Filesystsems (Physical disks open fine):

    Code
    DirectoryIterator::__construct(/tmp): failed to open dir: Permission denied


    Update manager/check:

    Code
    Failed to execute command 'export LANG=C; sudo apt-get update > 2>&1 & echo $!':


    Rsync/start job:

    Code
    Failed to execute command 'sudo sh '/var/lib/openmediavault/cron.d/rsync-53270d44-b15d-49eb-b7f1-a31de7197116' > 2>&1 & echo $!':


    If I execute the exact same commands from a root shell it works fine. So I believe the Web Gui doesn't have sufficient right to execute these commands. Any idea what I messed up?


    Thank you very much


    Michael

  • Code
    groups openmediavault
    groups admin
    cat /etc/passwd | grep openmediavault
    cat /etc/passwd | grep admin


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Thank you for looking into my problem.


  • Code
    uname -a
    lsb_release -a
    cat /etc/issue


    Code
    su openmediavault
    export LANG=C; sudo apt-get update


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!


  • Hmm... One thing I don't understand why it tries to execute the command via sudo?! Even tough it works as you see yourself, it is not used by OpenMediaVault. Do you happen to have some custom modifications?


    Code
    cat /etc/sudoers


    Also, to fix the key error:


    Code
    apt-get install openmediavault-keyring


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Hi David,


    No custom modifications as far as I know. Just miniDLNA and CUPS added. But it all worked for some days now. It changed today. Also strange: Windows is no longer able to access the shares. If I add the user I am using to log on for the share to the root group and it worked again. I just tried out of curiosity to add my windows user and openmediavault to the root group in /etc/groups and it works again. So it is really some unresolved permissions. What could I have changed. I am not aware of doing anything other than playing with rights in the web gui, not via a root shell.



  • Ah... I overlooked that you still use 0.4. Have been using 0.5 for too long now... ^^


    The entry in the sudoers file is fine, too. The openmediavault user has all rights it is supposed to have.


    You may try to reinstall OpenMediaVault. This won't reset your configuration!


    Code
    apt-get install --reinstall openmediavault


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • I'll try. Be back in a few minutes. Any ideas why adding openmediavault and myuser to root fixes the problem?


    Reinstalling now. It is complaining (warnings) about some stuff compiles against libxml 208 but using 207

  • Falling asleep here, but adding openmediavault to the root group should not fix anything from my perspective right now... (Cause openmediavault is already allowed to execute the command, as we checked earlier...)


    Have to look at it tomorrow or maybe tekkbebe has a look, he used 0.4 way longer than I did. Maybe he can remember better.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Doesn't work. Adding openmediavault to root fixes the problem. I just don't know if this messes up anything else.


    Thanks for your support and have a good night. Looking forward to hearing from you tomorrow.


    Michael

  • It sounds like ownerships may be messed up in a few areas. Did you do any upgrades lately?


    openmediavault is in the sudoers list. It should be able to run those scripts via sudo. There is something else going on.

  • Do you remember the bad job you ran??? I dunno, ppl manage to do it all the time.


    Do this:



    cd /var/www
    chown -R openmediavault:openmediavault openmediavault
    service apache2 restart


    It is like either your web-gui is not being run by openmediavault user or the ownership is wrong. Try that.
    Did you mess with apache at all???

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!