My answer will be given independently of development technology.
Your essential question is:
"How do we know who put a code in the production environment?"
Ideally, the system running in the production environment is a closed version, well defined and uniquely identifiable through (at least) a version code such as "v.1.0.0". This type of identification exists essentially to allow administrators to know exactly what is running on the server in terms of the implemented functionalities.
If your project uses a version control in the right way, your work process is briefly as follows::
- Developers work on fixing issues and implementing news arising from specific requests, usually identified by "ticket" numbers in a change control system (which may or may not be integrated into the version control system). Changes to the code are made in a way that is traceable to those requests. For example, when doing commits in Git, developers can indicate in the comment what is the number of the ticket the changes relate to.
- Someone in charge of the team plans the next version (e.g., v.1.0.1) in terms of what fixes and news will be delivered. This person charges developers for implementing the code and integrators for regression testing, and eventually demands the production (compilation) of the new version, which will include only planned changes. This is all done outside the production server, because it can be done while the current system is running and serving customers.
- After the new version is generated, it is updated on the production server (at some point in time, for example during the night when the use of the system is less and the interruption to update will generate less inconvenience). From the identification of the version (v.1.0.1) and the traceability matrix provided by the tools used and, mainly, by the process (where problems are described by a specific ticket and developers always remember to indicate such tickets in commit comments), it is easy to identify which changes were added (and who made them) to the new system running on the production server. Even more important than that, in case regressions, it is easier to identify the cause.
In short, you only know who put something on the production server if you have the history of updates made and future updates are made independently of what is running today.
Using version control on the server is not an issue per se as long as the areas with which it runs and what is being developed are kept separate. Otherwise, what is running (assuming something is interpreted) will be constantly changed and you simply lose control of what features are in use. But from a performance and security point of view, it doesn’t seem like a good idea to use the same server for both tasks. The same machine will be dividing resources to the final client and to the developers, and any need for downtime (to update its version control software, for example) will impact the availability of the service to customers.
If you don’t use any version control system (FTP only, as you say), it’s even more important to keep the structures separate for you to have at least some manual control of which features will be running. At some point, someone responsible will need to stop coding activities to "group" the code into an identifiable version and put it on the production server.
Dear Luiz, I think I expressed myself badly, we have already used the version control system in the development environment. In the production environment I would like to use for history/traceability of the upgraded modifications to the production server. Or if a serious error occurs on any page and a quick fix is required.
– William Pereira
Well, I still don’t get it. If you already have the history in the development environment, why do you need it duplicated in the production environment? About serious errors in production, you should test the pages before to put them into production precisely to avoid mistakes and to avoid having to "update in a hurry" (because then you lose control even).
– Luiz Vieira
@williamhk2 a point of the answer is: do not change code on the production server; all changed code should only arrive at production through a release, which has a version number, and through this number you track who did what and why. Going up code directly to the production server is where your problem is and for which you will not find good solution. Even a quick fix should have no reason not to follow the correct path: move up to the team’s standard versioner, from which a package with version number will be created.
– Caffé
@That’s what Caffé is all about! Thank you all.
– William Pereira
I thought both answers were right, but Big Daddy’s answer made me understand what you just said.
– William Pereira
No mistake, don’t worry. :)
– Luiz Vieira