Ticket #1619 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Problem with "preserve attributes", file times and ntfs/vfat partitions

Reported by: bilbo Owned by: slavazanko
Priority: major Milestone: 4.7.0-pre3
Component: mc-core Version: master
Keywords: Cc: mrmazda@…
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

In changeset 78f01a3a9ae7ef8b91c7541edd4760ac5a0d3f8f there was added detection of filesystem and defaulting to turning off "preserve attributes" on certain FS (ntfs, vfat and some others)

I guess this is because chown and sometimes even chmod can fail on these filesystems, resulting in many annoying messageboxes "chown failed on <file>" or alike.

Unfortunately, this turns off preserving timestamp as well, which is VERY bad. Before I noticed this behavior, this managed to do some damage (mtimes of many backed up files got lost, so I needed to recreate those backups again).

Suggested fix:

  1. always copy time/date of files
  1. There are more attributes for files (mtime, ctime, permissions, owner, group, possibly some ACL on some systems), so add once checkbox for date/time, one for permissions and one for owner/group. Perhaps another for ACL, once (if) they'll be supported in MC.
  1. have "preserve attributes" checked on always by default, but add "ignore failure to set all attributes" checkbox. This would solve also cases where another new "simple" filesystem without support for chmod/chgrp/chown appears, like recent ex-fat.

Or perhaps somewhat combine these solutions.

Change History

comment:1 Changed 9 years ago by slavazanko

  • Milestone changed from 4.7 to 4.7.0-pre3

comment:2 Changed 9 years ago by zaytsev

3) is actually a good idea.

I wrecked quite a few backups lately because of this and I was SOOO annoyed... Hopefully they were not very important anyway. Still I've never got time to add this to the tracker.

There is another problem related to this. Even it preserve attributes is set, FISH would set the year to the current year (2009) when copying files using SSH. This also needs to be investigated.

comment:3 Changed 9 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted
  • severity changed from no branch to on review
  • Priority changed from critical to major

created branch 1619_preserve_attributes_timestamp (parent: master)

initial changeset:c3507f868a18a11817aed0b7298e1be3cdc1acad

review.

comment:4 Changed 9 years ago by iNode

346 line now useless.

comment:5 Changed 9 years ago by slavazanko

346? Is you mean 746?

Yes, line is useless.

Fixed: changeset:b6d9b619ffa4c49dbd1126253f69aa73c88430c6

comment:6 Changed 9 years ago by iNode

  • Votes for changeset set to iNode

Yes I mean 746.

comment:7 Changed 9 years ago by zaytsev

  • Blocking 119 added

I think that http://www.midnight-commander.org/ticket/119 is a dupe, no?

comment:8 Changed 9 years ago by slavazanko

  • Blocking 119 removed

(In #119) #1619

comment:9 Changed 9 years ago by slavazanko

  • Blocking 1639 added

(In #1639) No. #1619 just about fixing timestamps with unchecked 'preserve attributes' option.

This ticket about always turned on 'preserve attributes' option.

comment:10 Changed 9 years ago by slavazanko

I think that http://www.midnight-commander.org/ticket/119 is a dupe, no?

Yes, looks like duplicate. #273 too.

comment:11 Changed 9 years ago by mrmazda

  • Cc mrmazda@… added

This bug should be closed as a duplicate of the much earlier filed bug 273, not the other way around as was done.

comment:12 Changed 9 years ago by slavazanko

This bug should be closed as a duplicate of the much earlier filed bug 273, not the other way around as was done.

See #273 for answer.

comment:13 Changed 9 years ago by angel_il

  • Votes for changeset changed from iNode to iNode angel_il

comment:14 Changed 9 years ago by angel_il

  • severity changed from on review to approved

comment:15 Changed 9 years ago by slavazanko

  • Votes for changeset changed from iNode angel_il to commited-master
  • Blocking 1639 removed
  • severity changed from approved to merged

comment:16 Changed 9 years ago by slavazanko

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:17 Changed 9 years ago by slavazanko

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.