American POW's captured during WWII would be held in what was called Luft Stalag's. They were usually separated by rank, officers in one camp or a part of it and enlisted in the other. Stalag 17 was for enlisted personnel. The camp commander was Oberst von Scherbach (Otto Preminger). Now as POW's you were expected to at least try to escape from the camp. Sometimes the escape could be something elaborate or just a spur of the moment attempt.
In the beginning of the film you have two men escaping and they even get outside but it's at that time they are shot down. Someone alerted the guards of an escape attempt and where they were going to come out. There is an informant or spy in the barracks. Since these men came from barracks 4 then that is where the informant is living.
Now when the men who got shot are laid out in the compound the next morning this was the Germans way of saying we know what's going on. Everybody in the barracks thinks it's Sgt. Sefton (William Holden) for you see he trades with the German's for goods. The men think he gave the two escapee's up for something and it seems he was correct in the betting of the attempted escape. There were wagers being made about whether the two men would make it.
Now if it wasn't one of the men selling information then it would have to mean that there was a German hiding out in the barracks spying on the Americans. Sefton thinks it's security Sgt. Price (Peter Graves). He just can't prove it. Another thing to think about is the barracks Sargent by the name of Schultz (Sig Ruman) who is buddy buddy to all the men but you know good and well that he is getting information from somebody and getting it to the Commandant.
This is an interesting movie to begin with but then a Lieutenant is shot down and he has to escape and get back to the allies. He was only brought to the barracks for a stopover until he gets reassigned to the Officer's area.
The movie has many interesting twists and turns and it has to be one of the very best ever made. Director Billy Wilder has brought together one of the greatest cast to be seen on film. You are able to look at this film as one of the must see films to view. Even if you just watch it the one time you know that what you have viewed is artistry at it's best. Enjoy.