I've done a php page index.php which uses some python scripts to retrieve some informations and copy them from a file A to a file B. My problem is that if I have more than one user that access index.php, B is modified from both the users. How can I make the second user wait until the first user has finished to modify B?
You can make one file in parallel xyz.txt.in_use and check for it every time from other location that the file is exists OR not then wait till it got deleted then after the writing completion, delete the xyz.txt.in_use, so that other can take charge on xyz.txt
Prevent multiple users write on file at the same time