Issue
I'm running Ubuntu Server 18.04.01 and am somewhat a noob when it comes to Linux permissions settings.
I have application A which is creating files and dumping them in a directory, and application B which is then taking those files, processing them and moving them somewhere else.
The problem I have is that application B is reporting that it cannot access the files created by application A. I can get around this by manually SSH'ing onto the server and running:
sudo chmod 775 -R ./Directory
However this is tedious and more importantly, requires human input. The whole purpose of my server is to automate some home security tasks so manual intervention is not feasible.
Please could someone let me know how I can make sure that all files created by application A, have rwx permissions for application B?
Thanks
Solution
Depending on the type of application A (is it a script or is it a binary?) you could just add to have it change the permissions once it created it.
If the application is a binary, you can "enclose" it into a script, which changes the umask before and during its runtime or change the permissions once the application stops running (e.g. as final task of the script).
Another approach is to run application A as the same user as application B is running, if this is feasible.
Answered By - Phoenix Answer Checked By - Timothy Miller (WPSolving Admin)