Ticket #72 (closed defect: fixed) — at Version 22
savannah: "preserve Attributes" unchecked, but chmod errors still there
Reported by: | bilboq | Owned by: | slavazanko |
---|---|---|---|
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 ossi) (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: | Core | Severity: | 3 - Normal |
Status: | In Progress | Privacy: | Public |
Assigned to: | Pavel Tsekov <ptsekov> | Open/Closed: | Open |
Release: | current (CVS or snapshot) | Operating System: | GNU/Linux |
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.
Comment 1 by Pavel Tsekov <ptsekov> at Thu 13 Sep 2007 09:35:30 AM UTC:
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.
Comment 2 by Pavel Tsekov <ptsekov> at Thu 13 Sep 2007 12:49:30 PM UTC:
Please, test the attached patch. (file #13935)
Comment 3 by Martin Petricek <bilboq> at Thu 13 Sep 2007 02:34:33 PM UTC:
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.
Comment 4 by Pavel Tsekov <ptsekov> at Mon 17 Sep 2007 07:03:46 PM UTC:
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.
branch:72_preserve_attributes
changeset:5097e9b62ed28ada175a4cfc27eee3f823d7345b
Change History
Changed 16 years ago by slavazanko
- Attachment 13935-copy_file_file_chmod.patch added
comment:1 Changed 16 years ago by guanx
- Keywords review added
This patch fixed two problems:
- When copying files, between mc's checking the target's non-existence and open(2)-ing the target file, (sym)link attack is possible.
- Even when "Preserve Attributes" is unchecked, permissions are still preserved.
comment:4 Changed 16 years ago by metux
- Owner changed from guanx to metux
- Description modified (diff)
comment:9 Changed 16 years ago by slavazanko
- Owner changed from angel_il to slavazanko
- Status changed from assigned to accepted
Patch actual.
Now rebased to master.
Also, added automatic toggle 'Preserve attributes' checkbox (relative to type of target filesystem)
Review & vote, please.
comment:10 Changed 15 years ago by iNode
When checkbox 'Preserve attributes' unchecked file permissions also saved.
How to repeat:
touch test umask 022 chmod 0600 test F5 (without Preserve attributes checked) ls -l %D/test
comment:12 Changed 15 years ago by angel_il
branch: 72_preserve_attributes (parent: master)
comment:14 Changed 15 years ago by slavazanko
rebased to current master.
changeset:f856eeb0eac182c2d7e9896b40c5a2fea46d5574
changeset:ce129506f6841e85da2389b18fdb49d0826a3021
comment:15 Changed 15 years ago by iNode
- Keywords rework added; review vote-angel_il removed
It's still doesn't work as described in case 2.
Please rework.
comment:16 Changed 15 years ago by slavazanko
- Keywords rewiew added; rework removed
It's still doesn't work as described in case 2
changeset:f37120e8fc69a8e307f44b65e8f940f32f5b23a8
review
comment:18 Changed 15 years ago by iNode
- Keywords approved added; rewiew vote-angel_il removed
Now it work correct. Thanks.
comment:20 Changed 15 years ago by slavazanko
- Keywords commited-master added; vote-angel_il vote-iNode approved removed
- Status changed from accepted to testing
- Resolution set to fixed
Merge commit: 78f01a3a9ae7ef8b91c7541edd4760ac5a0d3f8f
comment:22 Changed 11 years ago by ossi
- Description modified (diff)
- Branch state set to no branch
- Reporter changed from slavazanko to bilboq
added by ptsekov