Re: Cannot chmod target file "/#ftp:foo"



Hello!

For every file I upload to ftp.kit.net I get:

Error
Cannot chmod target file "/#ftp:foo"
Operation not permitted (1)

[ Skip ]  [ Retry ]  [ Abort ]

Sounds like the vfat problem fixed by adding "quiet" to
/etc/fstab. But how would I fix it for ftpfs :-)

The solution in the code would be the same - have one more flag in the
file context to ignore permission problems.  But the file operations is a
very dangerous place to touch.  Breakage in that code can result in lost
data.  So this will be done after the release.

On the other hand, I think it's OK to ignore chmod errors in ftpfs.  Could
you please try this patch:

================================
--- vfs/ftpfs.c
+++ vfs/ftpfs.c
@@ -1537,7 +1537,10 @@ static int ftpfs_chmod (vfs *me, char *p
     char buf[BUF_SMALL];

     g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
-    return send_ftp_command(me, path, buf, OPT_FLUSH);
+    send_ftp_command(me, path, buf, OPT_FLUSH);
+
+    /* Ignore possible errors */
+    ERRNOR (0, 0);
 }

 static int ftpfs_chown (vfs *me, char *path, int owner, int group)
================================

-- 
Regards,
Pavel Roskin



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