n3mo / massmine

Your Access To Data
GNU General Public License v3.0
73 stars 13 forks source link

cannot open file 'foo': Permission denied #3

Closed macloo closed 9 years ago

macloo commented 9 years ago

Error after typing ./massmine mmconfig (I am a new MassMine user, running it from my MacBook, in Terminal):

Running function restSearch... Error in file(file, ifelse(append, "a", "w")) : cannot open the connection Calls: taskDispatch ... write.csv -> eval.parent -> eval -> eval -> write.table -> file In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'twitter_data.csv': Permission denied Execution halted

This is in my mmconfig:

twitter:
 task : search 
 options:
  file.name : twitter_data.csv
  searchString  : florida
  tweets    : 20 

Mac OS X 10.9.5

It doesn't seem to be a permissions problem --

screen shot 2014-11-14 at 2 33 37 pm

n3mo commented 9 years ago

Although you appear to working in your home directory (specifically, in the directory ~/massmine/massmine), you appear to have mixed permissions. The owner of the folder ~/massmine/massmine appears to be "root," whereas the owner of the file "mmconfig" is McAdams. Presumably, when you run massmine you are running it as the user McAdams. This user account does not have write access to the folder you're working in.

To verify that you are working as the user McAdams, run:

whoami

If the result is McAdams then you simply need to change the owner of the folder as follows:

sudo chown McAdams ~/massmine/massmine

After that, you should be able to create files in that directory.

Cheers, Nick

macloo commented 9 years ago

Thanks! That worked. I successfully grabbed 20 Twitter records with MassMine!

n3mo commented 9 years ago

I'm glad I was able to help! Thanks for confirming your success!