Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

permission denied when sed in place edit in mingw

Tags:

mingw

I'm using mingw.

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

I can touch/rm files in current dir.

like image 980
peon Avatar asked Jan 14 '13 04:01

peon


2 Answers

It's caused by Windows security settings.

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.

like image 197
peon Avatar answered Oct 15 '22 11:10

peon


For me, folder was read only. unchecking readonly option fix my problem. Thanks to Zenadix commment

like image 35
Tapash Avatar answered Oct 15 '22 12:10

Tapash