Question: to be able to add annotations to a pdf file in linux, i have to reset the "Commenting" security setting in the pdf document.

`qpdf --decrypt input.pdf output.pdf` should remove any passwords or "encryption" ([according to this post](https://superuser.com/questions/216616/does-pdftk-respect-pdf-security-flags)) 

`pdftk input input.pdf output output.pdf allow AllFeatures` should set all document securities (including "Commenting") to be allowed

After applying both commands, in acroread i can still see (file -> document -> security tab) that commenting is not allowed.

How can I reset this security property?

Answer: 
The command `qpdf --decrypt input.pdf output.pdf` removes the 'owner' password. But it only works if there is no 'user' password set.

Once the owner password is removed, the `output.pdf` should already have unset *all* security protection and have allowed commenting. Needless to run your extra `pdftk ...` command then... BTW, your `allow` parameter in your `pdftk` call will not work the way you quoted your command. The `allow` permissions will only be applied if you also...

* ...either specify an encryption strength
* ...or give a user or an owner password

Try the following to find out the detailed security settings of the file(s):

```
qpdf --show-encryption input.pdf
qpdf --show-encryption output.pdf

```
The question is a common one and the answer is simple. Do not use acroread to check a document's security settings. qpdf is correctly removing the restrictions, but acroread does not know that.

Acroread is purposefully limited by Adobe so that it will not compete with Acrobat. (For example, you can type in forms, but you can't save the document).