Permission Denied saving database change file

ruby

#1

I am trying to make a change in my database but for some reason when I add my change to the migration file and save I get an error that says :

Failed to write to ‘20160625190818_change_data_type_for_products_price.rb’. Failed saving file ! : cartapp/db/migrate/20160625190818_change_data_type_for_products_price.rb ERR: Error: EACCES: permission denied, open ‘/home/ubuntu/workspace/cartapp/db/migrate/20160625190818_change_data_type_for_products_price.rb’.

I am not sure why I no longer have permissions to change things in my app?

Thanks


#2

I fixed this issue myself by navigating to my home directory (~/ or /home/USERNAME) and executing the command below. I’m not too savvy on this stuff, though I believe it is related to permissions. All better now!

sudo chown -R USERNAME *