I have an apache server set up, there is a php script for a login page (contains passwords).
I want to be able to give the server permissions to run the script but not for users who login through the script to access the login.php through webmin(which is installed on the server). The permissions for users who connect through webmin is set to the same as a user named 'front' which is not the owner. The login.php file is is set so the owner is root.
After running the command 'sudo chmod 777 ~directory of file~' the server could open the login page but obviously users who open file manager through webmin can also reead the usernames in the login file.
So I set the permissions to 'sudo chmod 200 ~directory of file~' this worked as I wanted. However upon restart the server would no longer display the login page (I assume somehow the permissions did not allow this).
I then set the permission to '777' (everything worked but not secure) then back to '200' which made the login-page load and the users weren't able to access the login.php file. Now I have to run both these commands (in that order) whenever I restart the server,
what could be causing this?
note: the users need to access the web-directory to edit pages but should not be able to read that specific page.