在mingw中进行sed就地编辑时,权限被拒绝 [英] permission denied when sed in place edit in mingw

查看:407
本文介绍了在mingw中进行sed就地编辑时,权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用mingw.

I'm using mingw.

  $ sed -i "s/a/b/" test.txt
  sed: preserving permissions for `./sed003480': Permission denied

我可以触摸/rm当前目录中的文件.

I can touch/rm files in current dir.

推荐答案

这是Windows安全设置引起的.

It's caused by Windows security settings.

从上下文菜单中打开文件夹的属性"设置.在安全性"选项卡中,单击"编辑",在弹出窗口中按"添加... ",然后将您的用户添加到列表中,选中"完全控制" Allow 列中.两次按确定来应用更改.

Open the folder's Properties settings from the context menu. In the Security tab, click Edit, press Add... in the pop-up window and add your user to the list, check Full Control in the Allow column. Press OK twice to apply the changes.

这篇关于在mingw中进行sed就地编辑时,权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆