ersilia-os / zaira-chem

Automated QSAR based on multiple small molecule descriptors
GNU General Public License v3.0
30 stars 11 forks source link

Tmp file elimination #4

Open GemmaTuron opened 2 years ago

GemmaTuron commented 2 years ago

Describe the bug Not all tmp files are eliminated when running the pipeline, hence they get try to get overwritten if a different user runs zairachem in the same workstation without a restart. As they are created by another user, they cannot be overwritten.

To Reproduce Steps to reproduce the behavior:

  1. Use a workstation with two users
  2. Run Zairachem with user 1
  3. Change user
  4. Run Zairachem with user 2

Expected behavior If all tmp files were deleted after running zairachem both users could use it without need to reboot. Probably not super prioriotary to solve

Screenshots PermissionError: [Errno 13] Permission denied: '/tmp/ersilia-3g2uz61d' In particular, there were 2 files still existing without global edit permissions: drwx------ 2 gturon gturon 4096 feb 19 12:53 ersilia-3g2uz61d

Desktop (please complete the following information):

miquelduranfrigola commented 2 years ago

OK this is an ersilia issue. Can you give the full error?

ferranroure commented 2 years ago

It seams that as you are writing in a system folder without root privileges, the only one can manage this file is you. Without having the complete picture, the quickest way could be change the permissions of the file once is created with something like this: https://www.adamsmith.haus/python/answers/how-to-change-file-permissions-in-python

However, a good practice could be delete the files that are created in the directory if they are not going to be used anymore, to avoid this kind of problems.

Some thoughts about /tmp folder that maybe helps on choose the way to follow.

https://www.fosslinux.com/41739/linux-tmp-directory-everything-you-need-to-know.htm

I hope this helps a bit :P

cheers!

miquelduranfrigola commented 2 years ago

It does help @ferranroure, thanks! Will post here an update once we've solved the issue