[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in sed
From: |
Rasmus Olsen |
Subject: |
Bug in sed |
Date: |
Tue, 28 Dec 2010 11:40:05 +0100 |
I have found that sed does not respect the write file permissions. It is
possible to change any file with sed -i as long as the user has write
permission to the directory and read permission to the file.
sed versions:
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
GNU sed version 4.2.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
Steps to reproduce the bug.
echo "hello world" > file
chmod a=r file
sed -i s/hello/my/ file
Best Regards
Rasmus
- Bug in sed,
Rasmus Olsen <=