Tagged: 600, 644, dowload file, download, nginx, permissium, problem
-
AuthorPosts
-
August 14, 2020 at 2:42 am #37383
I have transferred the domain to an Nginx server and I have the following problem:
The image download files produced by Symbiostock are stored in the _ssdl directory with permission 600 instead of permission 644. The files are therefore not downloadable from the server as they are accessible only by the user.
How can I solve the problem?
Thanks so muchAugust 16, 2020 at 7:54 pm #37399August 17, 2020 at 5:23 pm #37416I could try uninstalling and reinstalling symbyostock. Does this operation involve any risk of data loss?
August 19, 2020 at 8:32 pm #37436I checked: On the Apache server the permissions of the download file are 644 and therefore the file downloads regularly. On the NGINX server the permission of the download file is 600 and therefore cannot be downloaded. Can you tell me which software generates the download file with permission 600? Thank you. I would like to solve this problem.
August 20, 2020 at 6:54 pm #37438August 21, 2020 at 4:29 pm #37445Could the solution be to change PHP version?
Or replace NGINX with Apache?August 21, 2020 at 4:59 pm #37448August 22, 2020 at 3:08 am #37451I manage the server directly and I can intervene either by replacing PHP (downgrade of php7.4?), And NGINX with Apache.
I needed indications on which application to modify to see how to solve the problem. Exclude that it may be due to a too new version of Woocommerce?August 22, 2020 at 4:05 am #37452I was also thinking that the write permissions of the file could be set in the php.ini, but I’m not sure. Do you have any indication? Thanks so much
August 24, 2020 at 6:25 pm #37458Hello, … I’m currently testing a servicer with Nginx. Besides some problems with vector files, Nginx lacks the setting options via htaccess – files, which could solve write permissions.
Furthermore I could not find any relevant speed advantage of Nginx compared to Apache.
Just an idea – if you work with an administration part like Plesk or ISPConfig, Nginx write permissions could be added.
I added this permissions to Nginx :
#make nice paths available
location / {
try_files $uri $uri/ /index.php?$args;
}
# Deny public access to wp-config.php
location ~* wp-config.php {
deny all;
}August 24, 2020 at 11:44 pm #37461Thank you for the suggestion. I had already added the code:
location / {
try_files $ uri $ uri / /index.php?$args;
}to the Nginx file. Without this code I was seeing a 404 error on all pages.
Unfortunately this code does not eliminate the permissions error 600 on download files.
I have installed Nginx as in the future I would like to install the plugin for selling VIDEO with Symbiostock. I thought with Nginx videos it was faster.
Given the problem of operation, I am thinking of returning to Apache. What do you think about it?Thanks a lot for your interest.
August 25, 2020 at 2:50 am #37462I solved the problem with the “Downloads”> “Force Download for Customer” option. I don’t understand why but in this way I can download the files. Will it be a Symbiostock or PHP problem?
August 26, 2020 at 8:53 pm #37487Hi Paolo – this works because PHP is accessing the files directly and then feeding it to the customer rather than directing the customer directly to the files. This doesn’t solve the permissions problem but circumvents it. Your customers should be able to access files within subfolders directly if they have the URL.
You could try manually CHMODing the permissions of the download directory via FTP (try 777 to see how that works).
You could also try manually running CHMOD via PHP when download files are created within the Symbiostock code as a way of testing it.
August 27, 2020 at 3:29 am #37490If I manually change the permissions of the files generated for download to 644 the download works.
I didn’t quite understand how to manually run CHMOD via PHP when download files are created within Symbiostock code.
August 30, 2020 at 6:52 pm #37510It is plausible it won’t work even if you tried, as the permissions are not letting PHP create downloadable files to begin with. But this is the function:
https://www.php.net/manual/en/function.chmod.phpIf you would like us to try to do it for you by writing code, you can submit a support request via the link at the top. Otherwise you can try it out if you know anything about coding and we can help you here. However, it is likely this won’t solve the issue. It seems to be a hosting environment issue.
-
AuthorPosts
You must be logged in to reply to this topic.