denied_mask="c" means "create file", and "a" permissions cover it ("w" would be too much).
Can you please paste the log line you get in the second run of the script? I wouldn't be surprised if you get something different on the next run... (In other words: now that /root/.profile exists.)
The problem you describe in comment #1 sounds like a valid bug.
Bug 539433 (mentioned in comment #2) is really fixed (since a long time, even if it was closed today).
denied_mask="c" means "create file", and "a" permissions cover it ("w" would be too much).
Can you please paste the log line you get in the second run of the script? I wouldn't be surprised if you get something different on the next run... (In other words: now that /root/.profile exists.)
The problem you describe in comment #1 sounds like a valid bug.
Bug 539433 (mentioned in comment #2) is really fixed (since a long time, even if it was closed today).