hi, I have two users, let us call them A and B.
I do as User A
touch tmpfile chmod 700 tmpfile
Now as User B I do rm tmpfile - and it allows me to do it (after prompting me)...why?
If I had done chmod 777 tmpfile, then sure User B should be able to delete it, but I did chmod 700 tmpfile, so why was User B allowed to delete?
Thanks.
Because whether or not you are allowed to delete a file depends on the rights (namely write) on the directory containing the file, not on the rights on the file itself. You can imagine a directory to be a file containing entries of the files in it.
In this case, what is the purpose to give rights directly to a file?
>In this case, what is the purpose to give rights directly to a file?
What is the "delete" right on a file? ...