Permission problems chown

  • Hi.


    I have trouble with my permissions.


    I wanted to secure the webroot directory folder in "/var/www/openmediavault".
    That's why I used this guide: user_group_permission_chmod


    Unfortunately, I can't log in now.


    How can I change back user/group permission to "openmediavault-gui : openmediavault-gui" ?


    I used this commands:


    Code
    sudo chown -R www-data:www-data /var/www/openmediavault
    chmod go-rwx /var/www/openmediavault
    chmod go+x /var/www/openmediavault
    chgrp -R www-data /var/www/openmediavault
    chmod -R go-rwx /var/www/openmediavault
    chmod -R g+rx  /var/www/openmediavault
    chmod -R g+rwx /var/www/openmediavault

    Everything worked until I changed my rights in "/var/www/openmediavault"


    Thanks a lot for any help.

    • Offizieller Beitrag

    I wanted to secure the webroot directory folder in "/var/www/openmediavault".

    Why did you assume OMV was setting it insecure?


    That's why I used this guide: user_group_permission_chmod

    Just a note that that refers to apache and OMV uses nginx.


    sudo chown -R www-data:www-data /var/www/openmediavault

    This is a very bad idea since those files should be owned by openmediavault-webgui:openmediavault-webgui.

    Everything worked until I changed my rights in "/var/www/openmediavault"

    Yep. No offense but I wouldn't change permissions in that directory (or subdirectories) unless you know what you are doing.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Why did you assume OMV was setting it insecure?

    Just a note that that refers to apache and OMV uses nginx.

    This is a very bad idea since those files should be owned by openmediavault-webgui:openmediavault-webgui.

    Yep. No offense but I wouldn't change permissions in that directory (or subdirectories) unless you know what you are doing.

    It was a mistake.
    And yes, OVM runs on nginx.


    As I wrote everything worked before I changed permissions.


    So how to change rights back ?

    • Offizieller Beitrag

    So how to change rights back ?

    I would start with chown -R openmediavault-webgui:openmediavault-webgui /var/www/openmediavault. The other recursive changes are tougher to fix if they changed permissions to something they shouldn't. There are thousands of files in that directory. So, if the first command doesn't work, I recommend installing OMV on another system or VM to compare permissions of individual files.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I tried it. I got a message while trying to sign in (login webpage): "File not found."


    Nginx error log contains:


    Code
    FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream  server: openmediavault-webgui, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm-openmediavault-webgui.sock:"
    • Offizieller Beitrag

    Did you restart any services or just reboot?

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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