As a root user, I created a file in / directory. I can only read this file when logged in as normal user (say A) as expected.I changed the ownership to A.Now A can read as well as write.But when I try to delete it, permission denied message comes.Can anyone explain why?
Asked
Active
Viewed 549 times
1 Answers
6
Deleting a file isn't a modification of the file, it's a modification of the directory containing the file. If you don't have the rights to modify the directory, you cannot remove the file within that directory.

Andy Dalton
- 13,993
/usr/bin/stat /yourfile
? That would reduce the amount of guess work. – joepd May 26 '16 at 15:14