Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make temporary file name user dependent #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ablot
Copy link
Contributor

@ablot ablot commented Oct 19, 2022

On machines with strict user permissions, one cannot overwrite the temp file created by somebody else. Make sure that the username is in the file name to avoid conflicts.

On machines with strict user permissions, one cannot overwrite the temp
file created by somebody else. Make sure that the username is in the file
name to avoid conflicts
@ablot
Copy link
Contributor Author

ablot commented Oct 19, 2022

The prefered solution would probably be to use a single account on the system for acquisiton but that was apparently not an option for us.

@raacampbell
Copy link
Contributor

Sorry, just got around to this. If there is a currently running background process on a different user name then it will not be killed. See line 19, just under the lines you add. So I'm not sure if your solution is ideal.
Maybe we want to find all processes containing webPreviewBootstrap but likely that also does not work because you can't kill them, since they belong to a different user.
What is the reason for having the different users? I'm trying to think of what is the best solution to this, but I don't understand how you are organising things.

@ablot
Copy link
Contributor Author

ablot commented Nov 1, 2022

I don't think there is a real reason to have multiple users. I failed to convinced them that a kiosk account would be better. The imaging facility argued that it's simpler to keep track of microscope usage, to make sure that people have access to the data server with the proper permissions and to allow remote log in during acquisition.

I see the issue with the background process. We don't use the web preview yet. The real solution might be to make sure our temp folder has decent permission (make a brainsaw_users groups or something like that).

There is also a permission issue at the end of acquisition when trying to access the stitchit log file (~L43 on this file). For that the change in the file name might be a good solution.

I'll try that to ask for a permission change, revert the change and change only stitchit.log when I get the chance. You can close the PR and resurect it if more people have the issue.

@raacampbell
Copy link
Contributor

The other reason for the kiosk account is that I'm currently working on a solution to start the syncAndCrunch automatically from the acquisition PC. Initially I will probably just add a button to allow opening of the tmux session with one click but we will move on from there. If you want user tracking, we can add a field to the recipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants