[GIS] Why is the attribute table edit button greyed out

attribute-tableeditingqgis

I'm very new to GIS technology and have been trying to learn qGIS through downloaded tutorials. My qGIS is the 2.14.21 version. It was going well until the instructions told me to edit the attribute table of one of my layers (a sqlite layer with a polygon geometry type). The edit button is 'greyed' out, not allowing me to access this function. Why is this? I have tried various ways of selecting the data, restarting the program, and accessing the table through different buttons. The 'add a new field' button is also greyed, though the field calculator is functional. My online research hasn't come up with answers yet.
Image below is what I see when I open the attribute table

Best Answer

This can happen if you don't have permission to edit the layer. Outside of QGIS, open the folder that the layer is in, right-click on the layer, and open Properties > Security. Where it says "Permissions for [username]" there should be a check next to "Modify" and "Write." If not, change the permissions for that file. If you don't have permission to change the permissions (a rather infuriating logic loop), save a copy of the layer to a folder that you can edit, and work from the copy.