i have a Plesk: psa v12.5.30_build1205150826.19 os_Ubuntu 14.04
recently i made a big mistake and ran this command: chown -R 10003:1003 /
It set all my permissions to 10003 and myPlesk was broken. I repair it via ssh with plesk repair fs and launched an update of plesk via ssh.
But i have still some issue, when i triggers a download via PHP with this code:
$mm_type="application/octet-stream";
$file = '../uploads/files/' . $filename;
header("Cache-Control: public, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: " . $mm_type);
header("Content-Length: " .filesize($filename));
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");
ob_end_clean();
readfile($file);
my files are the size of 64kb so they should be 17MB. I investigated and found this error in "proxy_error_log':
2019/01/20 18:34:53 [crit] 28055#0: *17137 open() "/var/lib/nginx/proxy/3/10/0000000103" failed (13: Permission denied) while reading upstream, client: 80.XXX.XXX.XXX, server: mydomain.com, request: "GET /download.php?id=15 HTTP/1.1", upstream: "https://45.XXX.XXX.XXX:7081/download.php?id=15", host: "mydomain.com"
This permissions issue reapper, can you tell me whats the good permissions for /var/lib/nginx please? Or tell my how to set the rights permissions.
Thanks
recently i made a big mistake and ran this command: chown -R 10003:1003 /
It set all my permissions to 10003 and myPlesk was broken. I repair it via ssh with plesk repair fs and launched an update of plesk via ssh.
But i have still some issue, when i triggers a download via PHP with this code:
$mm_type="application/octet-stream";
$file = '../uploads/files/' . $filename;
header("Cache-Control: public, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: " . $mm_type);
header("Content-Length: " .filesize($filename));
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");
ob_end_clean();
readfile($file);
my files are the size of 64kb so they should be 17MB. I investigated and found this error in "proxy_error_log':
2019/01/20 18:34:53 [crit] 28055#0: *17137 open() "/var/lib/nginx/proxy/3/10/0000000103" failed (13: Permission denied) while reading upstream, client: 80.XXX.XXX.XXX, server: mydomain.com, request: "GET /download.php?id=15 HTTP/1.1", upstream: "https://45.XXX.XXX.XXX:7081/download.php?id=15", host: "mydomain.com"
This permissions issue reapper, can you tell me whats the good permissions for /var/lib/nginx please? Or tell my how to set the rights permissions.
Thanks