Copy/Move: Access Rights option

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Copy/Move: Access Rights option

Post by pepak »

Hi!

When copying (or moving) files, I prefer to set the "Access Rights" option to "Inherit", so that the copies get access rights according to the ACLs on the destination directory. This works fine, but if the active user doesn't have sufficient rights to the destination directory, he gets an error message because the rights can't be changed. Would it be possible to add an option to disable this error message? That is, the Copy function would try to set access rights to Default/Copy/Inherit, but if it failed, it would silently continue with other files.

Note: I could use multiple user profiles with different default settings for the Copy/Move dialog. Unfortunately, it is quite difficult (perhaps even impossible) to keep all the other configuration options synchronized between these profiles, particularly if both users are active at the same time.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Re: Copy/Move: Access Rights option

Post by DrKnS »

Please explain how to set up ACL for destination directory to reproduce it.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Copy/Move: Access Rights option

Post by pepak »

Oops. Seems like I have been using quite an old version of FAR, because the current one works just fine. My bad. Sorry.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Copy/Move: Access Rights option

Post by pepak »

Never mind, I just encountered the problem with current FAR. It doesn't make sense to me, though:

1) Windows 7 X64, UAC disabled.
2) Target directory is RWXD for Users and F for System and Administrators.
3) Source directory has the same rights.
4) Source file was created by System (e.g. a service created it) and has RWXD(inherited) for Users and F(inherited) for System and Administrators.
5) System.CopySecurityOptions is set to 27 (inherit for both Copy and Move).
6) A user from group Users (but not Administrators) tries to move the file from source directory to target directory. Indeed "inherit" is selected.
7) The file is moved OK, but then an error message "Access denied" (localized by Windows) "Cannot set file access rights for" (from FAR language file) "<destination filename>" appears, with options OK and Cancel. This message is repeated for every file if multiple files were to be copied.

This sequence is repeatable and works even when the source file (step 4) is created by hand by Administrator rather than a service: E.g. run two instances of FAR, one as Administrator and one as User (I am using CPAU to run as Administrator, but any other technique should work, with the possible exception of UAC's Run As Administrator), create a new file (in RWXD directory) using Admin FAR's editor, then try to move that file using User FAR. Note that you must use Move, Copy works fine.
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

Re: Copy/Move: Access Rights option

Post by DrKnS »

pepak wrote:an error message "Access denied" (localized by Windows) "Cannot set file access rights for" (from FAR language file) "<destination filename>" appears, with options OK and Cancel. This message is repeated for every file if multiple files were to be copied.
After 4070 there will be three buttons: skip, skip all and cancel.
pepak
Posts: 604
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times

Re: Copy/Move: Access Rights option

Post by pepak »

Thanks.
Do you know what's the reason for this message? Specifically, why it appears for Move but not for Copy, everything else being the same?
Post Reply

Return to “Support and Troubleshooting”