Closed kalxas closed 4 years ago
Sorry for this. I'll have to look more into it, but a quick workaround would be to run chmod -R 777 /mnt/archive/uploads
. chown -R apache: /mnt/archive/uploads
might also work.
I have tried both before sending the issue, the problem is that the uploaded folder is created as apache and the default permissions is 644, so the sen4cap user fails to move it to another folder.
I'm not sure why another system user tries to move the directory. You could also chmod -R 777 /mnt/upload
? That way the other user should be able to move it.
so if I understand correctly, all file manipulation actions happen from the apache user?
I would have to check, but that was my original assumption. But if another system user tries to move the files from the original upload folder, making it 777
should prevent the permissions error.
That's because moving /mnt/upload/foo/
to /mnt/other/bar/
requires:
/mnt/other/bar
in order to be able to create the destination/mnt/upload
in order to be able to remove foo
from itI have provided 777 to all folders under /mnt/archive and /mnt/upload and I get the same error:
Here are the folder permissions in the setup:
I also changed owner to sen2agri-service:
and get the same error.
That tells me that files are uploaded with default 644 permissions from apache user but the move is happening from sen2agri-service user which does not have permission to move the /mnt/upload/test_site_1/sen4cap_1580942568141 folder
While uploading files I changed the permission of the uploaded folder to 777 and I get the same error, so the problem must be something else.
It looks like the files actually get uploaded in /mnt/archive/upload/lpis/test_site_1/
A new folder is getting created as can be seen in the terminal. Can this be a timeout error being thrown because it is taking more time to copy than expected?
Thank you @lnicola for your help, I managed to fix the problem, it was related to the permissions of the files uploaded in the zip file.
I'm glad you got it fixed. We should test a similar scenario and validate the uploaded files or fix their permissions, because it seems impossible to debug otherwise.
yes, I had to make sure the files were a+rwx and the zip file not containing a folder, just plain files.
Hi, We are facing an error when we upload an LPIS shapefile:
Looks like the folder gets created in /mnt/uploads/[site] folder but with ownership by apache user and cannot be moved to the /mnt/uploads/lpis/ folder by the sen4cap user.
Any workarounds?