diff -ur thunar-0.9.0/thunar-vfs/thunar-vfs-io-jobs.c thunar-0.9.0-permfix/thunar-vfs/thunar-vfs-io-jobs.c --- thunar-0.9.0/thunar-vfs/thunar-vfs-io-jobs.c 2007-12-02 22:46:33.000000000 +0900 +++ thunar-0.9.0-permfix/thunar-vfs/thunar-vfs-io-jobs.c 2008-06-25 15:03:52.000000000 +0800 @@ -432,8 +432,12 @@ absolute_path = thunar_vfs_path_dup_string (lp->data); again: - /* try to create the file at the given path */ - fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0644); + /* Try to create the file at the given path. + * + * Note that despite the 0666 mask, we won't really create a world-writeable + * file unless the user's umask permits it (ie the umask is 0000). + */ + fd = g_open (absolute_path, O_CREAT | O_EXCL | O_WRONLY, 0666); if (G_UNLIKELY (fd < 0)) { /* check if the file already exists */ @@ -707,8 +711,13 @@ /* update the progress information */ _thunar_vfs_job_process_path (job, lp); - /* try to create the target directory */ - if (!_thunar_vfs_io_ops_mkdir (lp->data, 0755, THUNAR_VFS_IO_OPS_NONE, error)) + /* Try to create the target directory + * + * Note that the mode specified here is limited by the user's umask, so we will not + * actually be creating a world writeable directory unless the user's umask permits + * it. + */ + if (!_thunar_vfs_io_ops_mkdir (lp->data, 0777, THUNAR_VFS_IO_OPS_NONE, error)) return FALSE; }