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

Cannot download db/app files, account export, syspass log #1670

Open
vmario89 opened this issue Mar 13, 2021 · 3 comments
Open

Cannot download db/app files, account export, syspass log #1670

vmario89 opened this issue Mar 13, 2021 · 3 comments
Labels

Comments

@vmario89
Copy link
Contributor

vmario89 commented Mar 13, 2021

sysPass Version
v3.2.2

Hey,
for a longer while i cannot download db and app backup, no account export xml and no log file from the backend. the result is the same for chrome and firefox. If i click download the file is shown with a size and tries to download, but the files are zero bytes large in download folder. on the server the files are created correctly. i dont have any error message in browser console. i already checked php fastcgi parameters, nginx config and so on. have no clue what happens here. only message i get in nginx is the following:

2021/03/13 18:47:55 [error] 3899456#3899456: *349 FastCGI sent in stderr: "PHP message: [INFO] [Extensions checked] SP\Core\PhpExtensionChecker::checkMandatoryPHP message: [INFO] [Loaded icons cache] SP\Core\UI\Theme::initIconsPHP message: [INFO] [Loaded actions cache] SP\Core\Acl\Actions::loadCache" while reading response header from upstream, client: REDACTED, server: pass.some.server, request: "GET /index.php?r=items/notifications&sk=f03c3f1109c46fac791e8a89648d55f144deb8d8&isAjax=1&_=1615657315910 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "pass.some.server", referrer: "https://pass.some.server/index.php?r=index"
2021/03/13 18:47:58 [error] 3899456#3899456: *589 FastCGI sent in stderr: "PHP message: [INFO] [Extensions checked] SP\Core\PhpExtensionChecker::checkMandatory" while reading response header from upstream, client: 217.92.209.189, server: pass.some.server, request: "POST /api.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "pass.some.server"

grafik
grafik

on the server:
grafik

grafik

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 14, 2021

Hi Mario!

It seems that on the server side (through shell), it has the correct size, so it could be caused by any web server configuration that prevents to download the file. Also notice that the correct size is displayed on the download window, so PHP is reading the correct file size. I would discard the files size itself, since they aren't big enough for reaching any limit.

Regards

@vmario89
Copy link
Contributor Author

Hey Ruben,

basically i reduced my nginx config to

server {
        listen 443 ssl;
        listen [::]:443 ssl;
    ssl_certificate     /etc/ssl/someserver.de.pem;
    ssl_certificate_key /etc/ssl/someserver.de.pem;
    server_name pass.someserver.de;
    root /var/www/vhosts/pass.someserver.de;
    client_max_body_size 256M;
    index index.php;
    include snippets/fastcgi-php.conf;
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
    ssl_protocols TLSv1.3 TLSv1.2;
        ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
}

snippets/fastcgi-php.conf contains

# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;

# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;

# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;

fastcgi_index index.php;
include fastcgi.conf;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 256 4k;
fastcgi_intercept_errors on;
fastcgi_read_timeout 14400;
include fastcgi_params;

still got that issue. i played with different settings like read_timeout

anyone an idea? maybe i did some php misconfiguration?

@soulflyman
Copy link

I have a similar problem except that I run apache and the size in the download dialog windows is already wrong and shows 0kb.
Before I found this issue I opened a discussion at #1759

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

No branches or pull requests

3 participants