I run into this message while I was trying to change filter settings on a Google Spreadsheet which is shared with me.
There was a problem. You don’t have permission for this action

Even though I have “Edit” permission, I was unable to change some settings like filtering.
Solution
There was a “protected range” in the spreadsheet and it was only editable by the owner. After the owner gave me “Edit” permission on that protected range, the problem above has gone away.