https://bugs.kde.org/show_bug.cgi?id=404777

            Bug ID: 404777
           Summary: KIO::CopyJob::setDefaultPermissions does not work
           Product: frameworks-kio
           Version: 5.53.0
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: fa...@kde.org
          Reporter: alex.bikado...@kdemail.net
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

The following code creates a file at URL `destPath` with file permissions 600
(-rw-------).

>    QTemporaryFile *tempFile = new QTemporaryFile;
>    tempFile->setAutoRemove(false); // done below
>    tempFile->open(); // create file
>    
>    KIO::CopyJob *job = KIO::copy(QUrl::fromLocalFile(tempFile->fileName()), 
> destPath);
>    job->setUiDelegate(nullptr);
>    job->setDefaultPermissions(true);

This is because the temporary file is created with permissions 600 and
setDefaultPermission() seems to be ignored. According the documentation for it,
umask should be applied and the final file should have permissions 644
(-rw-r--r--) (when umask is set to 022).

Related to bug 395609.

Qt Version: 5.12

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to