Hi all,
Consider a file with read-only permissions for all that is r--r--r-- is a directory with permissions of 777. The owner of the file is say a user "abc".
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
Abhilash
___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
On Sunday 14 November 2004 12:23 pm, you wrote:
Hi all,
Consider a file with read-only permissions for all that is r--r--r-- is a directory with permissions of 777. The owner of the file is say a user "abc".
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
doesnt happen for me
kg
--- abhilash kumar linuxwarrier@yahoo.co.uk wrote:
Hi all,
Consider a file with read-only permissions for all that is r--r--r-- is a directory with permissions of 777. The owner of the file is say a user "abc".
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
Is this xyz user called "root" by any chance ?
Or maybe you have a modified version of vi, that changes permissions..
Can't think of anything else, though..
Abhilash
-- Sriram
__________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
Sometime Today, abhilash kumar assembled some asciibets to say:
Consider a file with read-only permissions for all that is r--r--r-- is a directory with permissions of 777. The owner of the file is say a user "abc".
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
What are the permissions for the directory that the file is in?
If the directory is writable by anyone, then a forced write will delete the original file and create a new file owned by the new user.
To avoid this, either don't make the directory writable by anyone, or turn on the sticky bit of the directory (chmod +t directory_name)
On 14/11/04 14:49 +0530, Philip Tellis wrote:
Sometime Today, abhilash kumar assembled some asciibets to say:
Consider a file with read-only permissions for all that is r--r--r-- is a directory with permissions of 777. The owner of the file is say a user "abc".
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
What are the permissions for the directory that the file is in?
See the first paragraph of the question.
Devdas Bhagat
abhilash kumar wrote:
1.Any other user say "xyz" can write to this file after opening it with vi using a forced write(wq!). 2.After the forced write "xyz" becomes the owner of the file.
Not unless "xyz" is the super-user (root).
--- Clinton Goveas :: http://www.clintongoveas.com