Ticket #72 (accepted defect) — at Version 4

Opened 15 years ago

Last modified 10 years ago

savannah: "preserve Attributes" unchecked, but chmod errors still there

Reported by: slavazanko Owned by: metux
Priority: major Milestone: 4.7.0-pre1
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset:

Description (last modified by metux) (diff)

Original: http://savannah.gnu.org/bugs/?21030

Submitted by:Martin Petricek <bilboq>Submitted on:Tue 11 Sep 2007 09:38:08 AM UTC
Category:CoreSeverity:3 - Normal
Status:In ProgressPrivacy:Public
Assigned to:Pavel Tsekov <ptsekov>Open/Closed:Open
Release:current (CVS or snapshot)Operating System:GNU/Linux

Discussion:

Mon 17 Sep 2007 07:03:46 PM UTC, comment #4:

I just have to think how to handle the EEXIST case from the patch 
and I'll commit it in CVS - hopefully it will get in 4.6.2. I'll 
appreciate it of anyone could help me with that and especially with 
the wording of the error message to be displayed to the user.
	Pavel Tsekov <ptsekov>
Project AdministratorIn charge of this item.
Thu 13 Sep 2007 02:34:33 PM UTC, comment #3:

Tried attached patch (file #13935) and it works for me. No more 
chmod complaints when "preserve attributes" unchecked when copying 
from FAT32 to NTFS partition. I have not observerd any ill effects 
from the patch.
	Martin Petricek <bilboq>
Thu 13 Sep 2007 12:49:30 PM UTC, comment #2:

Please, test the attached patch.

(file #13935)
	Pavel Tsekov <ptsekov>
Project AdministratorIn charge of this item.
Thu 13 Sep 2007 09:35:30 AM UTC, comment #1:

This problem has been discussed already in that thread:

http://mail.gnome.org/archives/mc-devel/2007-January/msg00075.html

I'll reread the thread and see whether to apply the suggested 
solution/workaround.
	Pavel Tsekov <ptsekov>
Project AdministratorIn charge of this item.
Tue 11 Sep 2007 09:38:08 AM UTC, original submission:

I have tried copying files from mounted FAT filesystem (memory card)
 to a NTFS filesystem (which was mounted using ntfs-3g over FUSE). I
unchecked "preserve Attributes" (as NTFS does not support 
chown/chmod)

But even with the preserve attributes unchecked I got following 
error message:

Cannot chmod target file "/m/s/eg/100_4646.jpg"
Operation not permitted (1)

on each of the files. I hoped to avoid this when I unchecked 
"preserve Attributes".

I am using CVS version of MC, checked out and recompiled just few 
minutes ago, running on debian unstable, amd64 architecture.

branch:72_preserve_attributes
changeset:5097e9b62ed28ada175a4cfc27eee3f823d7345b

Change History

Changed 15 years ago by slavazanko

added by ptsekov

comment:1 Changed 15 years ago by guanx

  • Keywords review added

This patch fixed two problems:

  1. When copying files, between mc's checking the target's non-existence and open(2)-ing the target file, (sym)link attack is possible.
  2. Even when "Preserve Attributes" is unchecked, permissions are still preserved.

comment:2 Changed 15 years ago by guanx

  • Milestone set to 4.6.3

comment:3 Changed 15 years ago by guanx

  • Status changed from new to accepted
  • Owner set to guanx

comment:4 Changed 15 years ago by metux

  • Owner changed from guanx to metux
  • Description modified (diff)
Note: See TracTickets for help on using tickets.