Cannot Create A New Rails Project Due To chmod

I don’t know what’s changed, but recently when I try to create a new Rails project I get the error

/home/eric/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/fileutils.rb:1348:in `chmod': Operation not permitted @ chmod_internal - /mnt/Data/Code/foodFinder/bin (Errno::EPERM)

And if I then they to use Rails s to run it, I get the error

bin/rails:3:in `require_relative': cannot load such file -- /mnt/Data/Code/foodFinder/config/boot (LoadError)
from bin/rails:3:in `<main>'

All my old projects still seem to run fine. A probable related error, however, is if I try to init a new git repository. For example, if I go into the foodFinder folder and run git init I get the error

error: chmod on /mnt/Data/Code/foodFinder/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/Data/Code/foodFinder/.git/config.lock failed: Operation not permitted
error: chmod on /mnt/Data/Code/foodFinder/.git/config.lock failed: Operation not permitted
Initialized empty Git repository in /mnt/Data/Code/foodFinder/.git/

What’s going on here? This is really frustrating and completely stopping me from making anything new in Rails.

  • Rails project that is actively updated as a base
  • private repo is getting cloned via ansible playbook but private gem are not getting installed
  • Thinking Sphinx with Rails: should I include these files in my git push?
  • How to sync the local folder with the Git Repository on NitrousIO
  • Using Bundler with Git, is https:// or git:// better?
  • git push heroku hangs
  • Rails3 & Git & Heroku - development/staging server
  • Share code/configurations/conventions/gems between Rails apps
  • One Solution collect form web for “Cannot Create A New Rails Project Due To chmod”

    I’ve found a solution to my problem. The issue was, as KaiMattern thought, in the mount options. I needed to set the uid to me (done by adding uid=eric to the fstab options). Prior to that, it had been set to root by default.

    I don’t know how that got changed, but it’s resolved my issues.

    Git Baby is a git and github fan, let's start git clone.