Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).

Assignment 2 and Clarifications.
 
Options:
RSS cloud
Jump to:

sed changing rw to r permissions on files in WSL

1 of 390 articles shown, currently no other people reading this forum.
photo
From: Lee dB.
Date: Fri 22nd May, 8:29am
Actions: 
        Login-to-reply
As far as I know, the -i flag in sed works by writing the modified stream to a temporary file, then replacing the original file with the temporary file. I don’t know if this is done by 
overwriting the contents of the existing file, or replacing the file entirely. Either way, I wonder if there’s some strange interaction going on between the Windows filesystem Access 
Control List and the Linux Subsystem? 

Or maybe it’s an issue with your umask environment variable causing the new (replacement) file to have the wrong permissions, though I would have thought sed would be designed to preserve 
the mode of the file regardless of how it operates internally. 

Related articles

sed changing rw to r permissions on files in WSL (all 7) RSS
├─ original   Thu 21st May, 9:55pm, Alastair H.
├─ reply 1   Thu 21st May, 11:38pm, Maktoom A.
├─ reply 2   Fri 22nd May, 5:12am, Alastair H.  O.P.
├─ reply 3   Fri 22nd May, 8:11am, Christopher M.
├─ THIS   Fri 22nd May, 8:29am, Lee dB.
├─ reply 5   Fri 22nd May, 9:53am, Alastair H.  O.P.
└─ reply 6   Fri 22nd May, 9:55am, Christopher M.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020