I have a website which uses PDFTK.
My site allows users to send PDF files via a form, then, at the click of a button, launches a combination of all files to create one.
When sending my files, my apache user is assigned.
Except that when I run the command line, it does not work. If I pass all my files in user and group root, the command line is passed. Except that I have a manual action to do what is not possible for the proper functioning of my site.
This is my command with the error:
$ /snap/bin/pdftk "upload/418/2018/fichier1.pdf" cat output upload/418/2018/fichiercombine.pdf dont_ask Error: Unable to find file. Error: Failed to open PDF file: upload/418/2018/fichier1.pdf Errors encountered. No output created. Done. Input errors, so no output created.
This is a good command but with
chown -R root:root upload/418/2018 /snap/bin/pdftk "upload/418/2018/fichier1.pdf" cat output upload/418/2018/fichiercombine.pdf dont_ask
What could be the problem here?