Bug 58236 - Failed to set file mode for PDF file - Print jobs are not executed successfully - Function not usable
Summary: Failed to set file mode for PDF file - Print jobs are not executed successful...
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: UMC - Printermoderation
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS@school 5.0 v7-errata
Assignee: Sönke Schwardt-Krummrich
QA Contact: Ole Schwiegert
URL:
Keywords:
Depends on: 58208
Blocks:
  Show dependency treegraph
 
Reported: 2025-04-28 11:51 CEST by Ole Schwiegert
Modified: 2025-04-28 15:25 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.200
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support: Yes
Flags outvoted (downgraded) after PO Review:
Ticket number: 2025032121000191
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Schwiegert univentionstaff 2025-04-28 11:51:27 CEST
+++ This bug was initially created as a clone of Bug #58208 +++

I start a class assignment with school users as usual and these are created correctly according to our school guidelines. After the student logs on to the Windows client for the first time, the respective exam-user folder is also created under /var/spool/cups-pdf/ with the correct authorisation. In the current state, a print job will be successful because the authorisation for /var/spool/cups-pdf/exam-user is correct. After the class work is finished, the user permissions for /var/spool/cups-pdf/exam-user will be changed from user ‘exam-user’ to Linux ID. If a new class assignment is now created with the same student, the permissions are not adjusted and therefore the student does not have the authorisation to successfully execute print jobs. The exam-user does not notice this on the Windows client, where the print job is successful. Due to the error failed to set file mode for PDF file the print job is not displayed in the UMC under printer moderation.This behaviour has been verified by a ticket, and the pain for the school customer is very high, as they need this function for the upcoming exams at the end of this month. Otherwise, the students will not be able to successfully complete the exams.

The following error messages can be found in /var/log/cups/cups-pdf-PDFDrucker_log.
Tue Apr 15 15:51:32 2025  [ERROR] failed to set file mode for PDF file: /var/spool/cups-pdf/exam-mirac.erde/smbprn.00000013_Druckauftrag_-_Editor____jd.pdf (non fatal)
Tue Apr 15 15:51:32 2025  [STATUS] PDF creation successfully finished for exam-mirac.erde

ls -lah /var/spool/cups-pdf/
insgesamt 36K
drwxr-xr-x  9 root root                      4,0K Mär 28 14:35 .
drwxr-xr-x 12 root root                      4,0K Mai 13  2024 ..
drwxrwxrwt  2 root lpadmin                   4,0K Jun  2  2020 ANONYMOUS
drwx------  2 2771 Domain Users mejneschool2 4,0K Mär 28 14:28 exam-emel.erde
drwx------  2 2769 Domain Users mejneschool2 4,0K Mär 28 14:04 exam-esra.erde
drwx------  2 2773 Domain Users mejneschool2 4,0K Mär 28 14:28 exam-mirac.erde
drwxr-x--x  2 root lp                        4,0K Apr 15 11:19 SPOOL


If I now adjust the authorisation manually via chown so that the exam user has the authorisation set correctly, it works as expected.(see attachement)

ls -lah /var/spool/cups-pdf/
insgesamt 36K
drwxr-xr-x  9 root            root                      4,0K Mär 28 14:35 .
drwxr-xr-x 12 root            root                      4,0K Mai 13  2024 ..
drwxrwxrwt  2 root            lpadmin                   4,0K Jun  2  2020 ANONYMOUS
drwx------  2            2771 Domain Users mejneschool2 4,0K Mär 28 14:28 exam-emel.erde
drwx------  2            2769 Domain Users mejneschool2 4,0K Mär 28 14:04 exam-esra.erde
drwx------  2 exam-mirac.erde Domain Users mejneschool2 4,0K Mär 28 14:28 exam-mirac.erde
drwxr-x--x  2 root            lp                        4,0K Apr 15 15:51 SPOOL


Tue Apr 15 15:51:32 2025  [ERROR] failed to set file mode for PDF file: /var/spool/cups-pdf/exam-mirac.erde/smbprn.00000013_Druckauftrag_-_Editor____jd.pdf (non fatal)
Tue Apr 15 15:51:32 2025  [STATUS] PDF creation successfully finished for exam-mirac.erde
Tue Apr 15 16:11:07 2025  [STATUS] PDF creation successfully finished for exam-mirac.erde
Comment 2 Ole Schwiegert univentionstaff 2025-04-28 15:25:57 CEST
Errata updates for UCS@school 5.0 v7 have been released.

https://docs.software-univention.de/ucsschool-changelog/5.0v7/en/changelog.html
https://docs.software-univention.de/ucsschool-changelog/5.0v7/de/changelog.html

If this error occurs again, please clone this bug.