-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem in the Copy operation #2278
Comments
The problem is still present in version 4.7.4 |
the problem is still there: |
the problem is still there: |
Replying to eshkrig (#2278):
Yes, that done in #72. But how do you think should be a difference whether "Preserve attributes" is checked or not? |
IMHO: existing files should only get new content (as earlier versions do)
for example:
-rw------- /path_src/dir1/secret_file # secret file with new contents
when copying dir
That is fail becose structure may contain thousands of hundreds of thousands of catalogs.
As I mention there is security bug for 9 months now (I am sad). |
Replying to eshkrig:
I don't quite understand, why you check "Preserve attributes" off if you want keep permissions. |
Replying to andrew_b:
Because here changes the file owner and permissions.
For example as root I often have to modify configuration files in users' home directories.
Now the situation is as follows: |
|
The patch, which fixes the problem |
My bug was marked as a dupe of this (#2615) although it seems to me its something different. |
|
|
|
|
|
Merged to master: [3907f19].
|
|
Thank you. |
I'm not sure what exactly was fixed but I'm on 4.8.6-1 now and see that copy operation doesn't respect umask set on a remote host when using ssh.
So I connect to a remote via "Shell link...".
There I have umask set via pam_umask to 026.
If I copy a file/directory from local host to the remote and set Preserve Attributes to OFF, then the file/directory is created with 644/755 permissions.
Also I would like to have "Preserve attributes" OFF by default, any ideas how to do this?
UPDATE
After looking in code it becomes clear that MC takes local mask and use it to chmod'ing a remote object:
https://github.com/MidnightCommander/mc/blob/master/src/filemanager/file.c#L1894
This happens with both SFTP and FISH VFSes which I tested.
there should be something like:
Unfortunately I don't know how to check if a vfs is remote. Please fix this. |
|
|
Important
This issue was migrated from Trac:
eshkrig
(eshkrig@….com)gotar@….pl
,howaboutsynergy@….me
Hi.
Sorry for my English.
Previously, copying a file does not change access permissions of the destination file if the check box "Preserve attributes" in the Copy window is not set.
For some time it is not so: if you uncheck the "Preserve attributes" then access permissions of the destination file are set in accordance with the value of umask, which can lead to information disclosure(i.e. security problem).
Note
Original attachments:
eshkrig
(eshkrig@….com) onJul 14, 2011 at 18:57 UTC
The text was updated successfully, but these errors were encountered: