Click to See Complete Forum and Search --> : Linux Security? Dir Read and Write
x0054
01-21-2005, 04:38 AM
Hay guys, quick question: I created a directory /testdir and chmod it to rwxr--r-- and then created a file inside the directory. The file was /testdir/test chmod'ed to rwxrwxrwx. Now here is my question, why does linux let me edit the 'test' file under a different user even though that user does not have write privileges to that directory? I would imagen that an unprotected file in a protected directory would be also protected as well. Can anyone explain?
- Bogdan
sharth
01-21-2005, 05:32 AM
the write privs should just keep you from creating new files.
x0054
01-21-2005, 03:05 PM
Ahh. Well yeah, it does that, stops me from creating new files. I there a way to box a user into a directory and not aloe him/her to write or read from anything but that users directory. I have read that chroot does something like that. But if I use chroot, I would also need to copy over all the commands such as cd, ls, etc.. into the home directory of the user. (as far as I understand) Is there a better way?
- Bogdan