Re: Problems with vfs / ftpfs



On Thu, Feb 28, 2002 at 08:00:00PM +0400, Walery Studennikov wrote:
> On Thu, Feb 28, 2002 at 05:18:48PM +0200, Andrew V. Samoilov wrote:
> > >>>Cannot chmod target file "/mnt/d/file.txt"
> > >>>Operation not permitted (1)
> > >>>
> > >>You can unset "preserve Attributes" when copy.
> > >>In January, 2002, I sent a patch to enable this feature for Move 
> > >>operation.
> > >>
> > >
> > >This doesn't work for me. I've tried several versions,
> > >now I'm using CVS version.
> > 
> > 
> > Confirmed for root. It seems preserve_uidgid option is more powerful
> > than 'preserve Attributes'.
> 
> Where is / what is "preserve_uidgid" option?

preserve_uidgid was wrong impression.

You can find these lines in mc(1) manual:

    preserve_uidgid

      If this option is set (the default), when logged in
      as root the default will be to preserve the UID and
      the  GID  of  files.   Some users prefer to disable
      this option, so that's why it's configurable.


> So, how to solve / workaround this problem?
 
Sorry, I can't reproduce this now even for root.

Can you test patch below?

ChangeLog:

* file.c (copy_file_file): Check ctx->preserve.

--- mc-cvs/src/file.c	Thu Oct 11 20:14:26 2001
+++ mc/src/file.c	Thu Feb 28 17:43:05 2002
@@ -808,7 +787,7 @@ copy_file_file (FileOpContext *ctx, char
       * chmod can be invoked
       */
     retry_dst_chmod:
-	if (!appending && mc_chmod (dst_path, src_mode & ctx->umask_kill)){
+	if (!appending && ctx->preserve && mc_chmod (dst_path, src_mode & ctx->umask_kill)){
 	    temp_status = file_error (_(" Cannot chmod target file \"%s\" \n %s "), dst_path);
 	    if (temp_status == FILE_RETRY)
 		goto retry_dst_chmod;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]