backport one upstream patch to fix EPERM error. Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>