Re: extended attributes

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

 



At 9:39 PM +1000 5/4/06, Russell Strong wrote:
>Aaron Konstam wrote:
>> On Thu, 2006-05-04 at 20:23 +1000, Russell Strong wrote:
>>
>>> Hi,
>>>
>>> I've found that when I edit a file with vi or gedit I lose all of the
>>> user extended attributes associated with that file.  A stat reveals that
>>> the inode number has changed.  Is this the reason why I'm losing the
>>> extended attributes?  Is vi and gedit creating a new file?  Is it easy
>>> to change this behaviour?
>>>
>>> thanks,
>>> Russell
>>>
>> I don't know for sure but that makes sense to me. When vi is used, at
>> least, a temporary copy of the file is created to be edited. It would
>> not surprise me that when you save the file a new file with a new inode
>> is created.
>>
>I don't know much about selinux, but doesn't that also use extended
>attributes.  I've tried writing a file with a unique selinux label,
>verified using stat that the inode number changed, however it kept it's
>selinux extended attributes.  Am I wrong about selinux?

SELinux does use EAs.  There is much magic in SELinux, including default
labeling for new files.  Try changing the context from the default and then
editing.  I did it as root with chcon, changing a user_u to root, verifying
with "ll -Z", and then editing with gedit; the default of user_u was set
again afterward.  Using cream, a gui for vim, did not change the context.
ISTR that vim copies back into the original file.
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '                              <http://www.georgeanelson.com/>

-- 
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