【发布时间】:2023-03-28 23:15:01
【问题描述】:
almanex@LAPTOP-GHRH09TN:~$ cd /mnt/x/
almanex@LAPTOP-GHRH09TN:/mnt/x$ mkdir -p coding
almanex@LAPTOP-GHRH09TN:/mnt/x$ cd coding
almanex@LAPTOP-GHRH09TN:/mnt/x/coding$ rails new webapp
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create Gemfile
run git init from "."
error: chmod on /mnt/x/coding/webapp/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
您好,我正在尝试在 Rails 上创建一个应用程序,但 chmod 存在问题,我已经搜索了网络,但只有一个解决方案我找到并已经尝试过(如您所见):创建带有 -p 选项的目录。这没有帮助。你有什么想法吗?
【问题讨论】:
-
欢迎来到 SO。
-p与文件权限无关。如果它不存在,它只会创建父目录。尝试使用sudo执行命令
标签: ruby-on-rails linux bash permissions chmod