Question about file system permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, all

Suppose that in a FC6 system there are two users, user01 and user02. Both are 
members of the group users, which is their primary group. They're not members 
of the group root. There is a directory named /test:
drwxrwx--- 2 root users 4096 Dez 26 12:42 test/

In this directory, there is a file named file.txt:
-rw-r----- 1 user01 root 90 Dez 26 12:43 file.txt

user02, as expected, is not able to read nor modify the contents of this file, 
as he does not have read nor write permissions on it. However, he can delete 
the file, because he has write permissions on /test, once he's member of the 
group users.
However, if user02 opens file.txt in VIM, edit it and then save it with :w!, 
the file is modified, saved, and its ownership is altered to user02:users.
How can this happen?? How can VIM alter the ownership and write to this file, 
if user02 is not it's owner and have no permissions on it? user02 can't do 
that using chown, chmod nor chgrp, but using VIM he can?!

Thanks,

Marcelo

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux