Open Bug 1728750 Opened 3 years ago Updated 2 years ago

print to pdf doesn't handle filesystem permissions

Categories

(Core :: Printing: Setup, defect)

defect

Tracking

()

People

(Reporter: goddard, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

  1. open firefox
  2. ctrl+p
  3. select location where the current user doesn't have permissions to write
  4. print the pdf

Actual results:

print dialog was displayed (and closed when the operation was seemingly finished), but the file was not written to the destination, nor anywhere else

Expected results:

firefox will display dialog that this is not allowed and displays file chooser again

firefox v78.13 esr, rhel 9.0 beta

The Bugbug bot thinks this bug should belong to the 'Core::Printing: Setup' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Printing: Setup
Product: Firefox → Core

This has gotten quite a bit better in newer Firefox releases, with the redesigned print dialog and Firefox's built-in "Save to PDF" target.

With the new print dialog, when we fail to write the file (e.g. to /test.pdf), we just return you to the print dialog. If you click "Save" again (to save the printout as a PDF), we pop up the file picker again.

We could definitely stand to be a bit clearer about the fact that we failed to write the file or something along those lines; but at least we don't silently close the print dialog anymore in the same way that we would if the operation succeeded. (It sounds like this was the behavior you had observed in comment 0, and I agree that's deceptive and a bit concerning, since it makes it look like the content was saved when in fact it was not.)

--> Setting as S4 since it still seems like there's some improvements that could be made, but it's a bit edge-casey and we do sort-of signal that the operation failed now (by keeping the print dialog open)

Severity: -- → S4
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 63 Branch → Trunk

(In reply to Daniel Holbert [:dholbert] from comment #3)

This has gotten quite a bit better in newer Firefox releases, with the redesigned print dialog and Firefox's built-in "Save to PDF" target.

With the new print dialog, when we fail to write the file (e.g. to /test.pdf), we just return you to the print dialog. If you click "Save" again (to save the printout as a PDF), we pop up the file picker again.

We could definitely stand to be a bit clearer about the fact that we failed to write the file or something along those lines; but at least we don't silently close the print dialog anymore in the same way that we would if the operation succeeded. (It sounds like this was the behavior you had observed in comment 0, and I agree that's deceptive and a bit concerning, since it makes it look like the content was saved when in fact it was not.)

--> Setting as S4 since it still seems like there's some improvements that could be made, but it's a bit edge-casey and we do sort-of signal that the operation failed now (by keeping the print dialog open)

Popping up the file dialog again and again is not clear about what went wrong.
Would it be possible to handle the problem like it's done in text editors etc. please?
Displaying actual non-modal dialog stating clearly what's the problem and what to do, such as "You don't have permissions to write into this location. Please select another location" would be very nice.

Agreed, that would be ideal. I was only commenting to confirm the bug, to note the behavior-change in newer builds, and to assess a severity. Hopefully someone can add some additional logic and UI around this, to make things less confusing when the user accidentally chooses a directory where they don't have write privileges.

Duplicate of this bug: 1790422
You need to log in before you can comment on or make changes to this bug.