Bug 274327 - file copying should preserve extended attributes
Summary: file copying should preserve extended attributes
Status: RESOLVED DUPLICATE of bug 116617
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.33.0
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2011-05-28 05:15 UTC by Mathias Panzenböck
Modified: 2018-01-30 08:18 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Panzenböck 2011-05-28 05:15:55 UTC
Version:           1.6.1 (using KDE 4.6.3) 
OS:                Linux

Dolphin should preserve extended attributes when a file is copied, if possible. Maybe this is not a Dolphin but a KIO bug?

I consider this a bug report and not an enhancement request, but you may differ. If so, change the severity.

Reproducible: Always

Steps to Reproduce:
add extended attribute to a file: attr -s user.test -V "hello world" foo.txt
copy file using dolphin

Actual Results:  
extended attributes are not copied

Expected Results:  
extended attributes are copied
Comment 1 Dawit Alemayehu 2011-12-16 18:32:02 UTC
The cp command does not do this either ; so expecting KIO to do it is more like an enhancement request to me.
Comment 2 Mathias Panzenböck 2011-12-16 20:53:20 UTC
Indeed. I think cp should do this as well. So its a feature request.
Comment 3 Michael D 2015-03-20 17:00:32 UTC
I think this should be changed to bug status now that metadata like tags and ratings are stored in extended attributes. Whether Dolphin preserves xattrbs is independent of whether cp and other commands do, since one would hope that if KDE makes use of xattrbs then those are preserved by its file manager operations like copy and move.
Comment 4 Moritz Herrmann 2015-05-15 11:22:17 UTC
+1
Comment 5 r4nd0m 2016-10-12 12:35:46 UTC
+1
Comment 6 Elvis Angelaccio 2017-04-21 17:15:05 UTC
*** Bug 370543 has been marked as a duplicate of this bug. ***
Comment 7 JKFRT 2017-09-23 18:08:41 UTC
I was about to file a new bug report before noticing this one. 

Dolphin doesn't preserve xattr when copying, even from ext4 to ext4.
I lost thousands of precious metadata because of this silent data loss. I consider it serious.

cp DOES preserve extended file attributes with the -a flag. 

Thunar seems to preserve xattr when copying / moving files around already. 

Would this be difficult to implement in Dolphin? Is KIO the subsystem responsible for this? I'm asking in order to look around the source code.

Thanks for your time.
Comment 8 Elvis Angelaccio 2017-09-24 09:17:04 UTC
(In reply to JKFRT from comment #7)
> Would this be difficult to implement in Dolphin? Is KIO the subsystem
> responsible for this? I'm asking in order to look around the source code.

Yes, this should be implemented in the file kioslave (in the kio repository, that would be src/ioslaves/file/file_unix.cpp).
Comment 9 Nate Graham 2017-11-20 05:33:09 UTC
*** Bug 370371 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2017-11-20 05:35:47 UTC
Marking as major since this can cause silent data loss, and investigating what it might take to produce a patch.
Comment 11 Nate Graham 2018-01-28 02:19:36 UTC

*** This bug has been marked as a duplicate of bug 116617 ***
Comment 12 funkybomber 2018-01-30 08:18:36 UTC
I have just posted a bounty for this bug. I'd like to see this issue fixed for both situations: 
1) when saving a file with extended file attributes
2) when copying a file/folder with extended file attributes

I know that this issue is multifaceted and serious, so this is my attempt to give it some renewed visibility and momentum!

Please note that I will need to see it solved in the KDE Neon Developer edition before I release the reward!
Happy coding! :)

relevant bug reports:
https://bugs.kde.org/show_bug.cgi?id=370543
https://bugs.kde.org/show_bug.cgi?id=274327
https://bugs.kde.org/show_bug.cgi?id=116617

bounty page:
https://www.bountysource.com/issues/54395598-please-add-extended-attribute-support-setxattr-getxattr