Skip to content

Linux App Service: autoswap.lock write permissions error is logged during every deployment #273

@ws-markb

Description

@ws-markb

We're seeing this error in every deployment log for any Linux app service:

Image

My theory is that this is down to the hard-coded backslashes in the lock file path here:

get { return System.Environment.ExpandEnvironmentVariables(@"%HOME%\site\locks\" + AutoSwapLockFile); }

As far as I can see this will cause issues writing to the file on Linux, because I'm assuming that the WriteAutoSwapOngoing method then tries to create a file called home\site\locks\autoswap.lock in the root directory / (which it obviously doesn't have permissions on).

File.WriteAllText(autoSwapLockFilePath, string.Empty);

I also can't see that this autoswap.lock file is then actually used or referenced anywhere else in the codebase? So could this potentially be removed completely?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions