Messages in this thread | | | Subject | Re: FS possible security exposure ? | From | Trond Myklebust <> | Date | Sun, 25 Dec 2005 10:45:42 +0100 |
| |
On Sun, 2005-12-25 at 12:29 +0300, regatta wrote: > Hi everyone, > > I have a question regarding how Linux handle the files permission , > here is what I found > > When logged on to a Linux workstation a user can edit a file (even if > the file on an NFS-mounted NAS directory) if he has write access at > the directory level, even if the file is owned by root (or any other > user) and is read-only.
Since you do not explain how you performed the test, it is hard to comment, but I don't see this behaviour you describe:
trondmy@lade test$ ls -al total 12 drwxrwxrwx 2 root root 4096 2005-12-25 10:42 . drwxrwxrwt 10 root root 4096 2005-12-25 10:41 .. -rw-r--r-- 1 root root 5 2005-12-25 10:42 test trondmy@lade test$ cat >test bash: test: Permission denied
If I use 'vi' to edit the file, then it can be modified, but the way vi does that is to delete the old file, and create a new one with the same name (and it will only do this if you use 'w!'). That should ordinarily work on Solaris too.
Cheers, Trond
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |