HOLLYWOOD — For thirty-eight years, the last face you saw before you left the lot and the first you saw coming in belonged to Gus Petrakis, and he made a point of knowing yours.

Mr. Petrakis, who manned a pedestrian gate at Paramount from a booth barely large enough to turn around in, checking badges and directing traffic and turning away the occasional determined tourist, died July 4 at a hospital in East Hollywood. He was 87. His son said the cause was complications from a stroke.

The job looked simple from a car window — a wave, a raised barrier, a nod at a windshield sticker — and Petrakis spent four decades proving it was not. A studio gate is a border, and a good guard reads the people crossing it: the nervous first-day extra who needs directing, the executive who does not expect to be stopped and must be anyway, the dressed-up stranger with no appointment and a good story. Petrakis had a courteous way of saying no that people remembered fondly years later, and a memory for faces that made him, in the words of one longtime editor, “the only person on that lot who knew everybody and answered to nobody.”

Konstantinos Petrakis was born in 1936 in Astoria, Queens, the son of a Greek short-order cook, and came west in his twenties after the Army. He took the gate job as a stopgap and never seriously looked for another. He liked the shift work, he told his family, and he liked the parade — the sense of sitting at the one point every day where the whole strange business of the studio had to slow down and show its face.

“Gus knew who was getting divorced before the trades did, and he never told a soul,” said Ramona Beaulieu, who worked a neighboring gate for eleven years. “People trusted him with the small stuff, so they trusted him with the big stuff. He could have written a book that would have gotten him sued into the ground. He wrote nothing. He just said good morning and meant it.”

He was proudest, his family said, of the drivers and crew he looked out for — the teamsters, the grips, the night watchmen coming off shift at four in the morning to whom he always had something to say. He kept a coffee thermos and a folding chair and a running feud with a particular parking supervisor that lasted, by his own account, twenty-two years and ended in friendship. He worked holidays by choice so younger guards with children could stay home.

Petrakis retired at seventy-five, walked out through his own gate for the last time, and came back exactly once, as a visitor, to show his grandson the booth. The guard on duty, a man Gus had trained, waved them both through without asking for a badge.

He is survived by a son, Dean Petrakis of Glendale; a daughter, Sophie Petrakis-Ahn of Seattle; five grandchildren; and, his family said, a drawer full of expired laminates from a studio that changed its badge design a dozen times while he stood at the door.