Cannot upload the new insitudata from the sites tab


#1

Hello,

I was trying to upload a new insitu data from the the sites tab of GUI. It says that the changes were successfully done after the upload, but the old insitu data remains. It’s weird that new insitu data successfully uploads in the customs job (after applying the patch).

I also applied this command:
sudo /mnt/upload


#2

Hello,
I don’t see any problem.
I’ve tested and everything works fine for me
What exactly is the message that appears after saving? Is the one below?
message


#3

Hello,

This is the message that appears (The same as yours):

Screenshot%20at%202018-11-28%2009-20-02

Before the upload of insitu file (The new insitu file to be uploaded beside the browse button below):
Screenshot%20at%202018-11-28%2009-21-14

After the upload process (The old and existing old file remains):Screenshot%20at%202018-11-28%2009-20-19

Also, there were several folders in the /mnt/upload/ and I’ve seen that each of them contain the correct insitu shpfile:

Is this situation just a bug in the system? How can I be sure if the system used the most recently uploaded insitu file?


#4

Hello,
I think the problem is that the files from destination directory are not replaced by the new ones.
You can run these 2 queries to see exactly which is the upload and the destination path:

  1. directory to upload:
    sudo -u postgres psql sen2agri -c “SELECT key, value FROM sp_get_parameters(‘site.upload_path’) WHERE site_id IS NULL”

  2. destination directory:
    sudo -u postgres psql sen2agri -c “SELECT key, value FROM sp_get_parameters(‘processor.l4a.reference_data_dir’) WHERE site_id IS NULL”

and after that, please take a look in the destination directory.


#5

Hello,

There is something wrong with the syntax.


#6

Hello,
The syntax is ok, you have to replace the single and double quotes after you copy the commands.


#7

Hello,

I think I’m missing or I just don’t know the meaning of Postgres command I entered:

Do I need to manually change it using the sen2agri-config?
Regards.


#8

By the way, this is what my folder looks like for the l4a reference data (the old shpfile remained) and the upload site folder:



#9

Hello,
If you open the last folder uploaded from /mnt/upload/Bukidnon_Pantaron the files PH_BUK_LC_PI_20180915_differentiated_6268 are still there?

Please type the following command:
ls -l /mnt/archive/insitu/
like in my printscreen:
image

and then the following one:
ls -l /mnt/archive/insitu/bukidnon_pantaron

I want to see the rights on the folder and on the files from the folder. It seems that the backup with the old files is not created and the new ones are not moved from the upload folder to archive, probably from the same reason.

Regards.


#10

Hi,

Yes it is still there. By the way here are the results of the ls -l command:

Should I change the user and the group to “root” instead of “sen2agri-service”?

Cheers.


#11

Hello,
I think you should first try to change only the rights without changing the user and the group.
chmod -R 0666 /mnt/archive/insitu/


#12

Hello,

I tried your chmod command and there is an error:

Do I also need to change the permission of /mnt/archive/upload/{site} ?

By the way, the existing in situ file disappeared from the web interface:

Screenshot%20at%202018-12-14%2017-40-49


#13

Yes, if there are not enough rights. You can try to give full control 777 instead 666. See what works for you.

In fact I think the rights on the upload/{site} folder should be ok, because it is created from php with 777.


#15

Now it worked. Thank you very much.

Brent