【问题标题】:Linux directory is stuck in read-onlyLinux 目录卡在只读状态
【发布时间】:2014-07-06 03:46:40
【问题描述】:

我在使用 Yeoman 和 Angular 时遇到问题。在我使用之前它工作正常

咕噜发球

为我正在创建的项目启动服务器。

但是,“grunt serve”返回了

错误:无法创建 git_template 目录:path.resolve 的参数必须是字符串

然后它给了我

警告:EROFS,只读文件系统 'app/index.html' 使用 --force 继续

然后我用了

咕噜服务--force

解决了这个问题,然后它击中了我。

我的整个本地文件已变为只读。

我尝试了“哟医生”(这是 Yeoman 查找问题的方式),但它甚至不再起作用。它给了我这个错误:

colin@Studio-XPS-1640:~/Desktop/ang-news$ yo doctor

/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:66
                throw err;
                      ^
Error: EROFS, read-only file system '/home/colin/.config/configstore/insight-yo.yml'
    at Object.fs.openSync (fs.js:410:18)
    at Object.fs.writeFileSync (fs.js:956:15)
    at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
    at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
    at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
    at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:23:15)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)

我尝试使用 chod 和 chown,但无济于事。这是我尝试过的示例

sudo chmod 777 /usr/local/lib/ -R -w

我认为我所做的只是弄乱了权限,现在我什至不能再使用 Yeoman,因为所有这些文件都是只读的。

编辑

原来我的整个系统都是只读的。我该如何解决?我试图通过 cmd 提取一些内容,它给了我

"OSError: [Errno 30] 只读文件系统:'/home/colin/startup-001'"

【问题讨论】:

    标签: linux angularjs permissions yeoman readonly


    【解决方案1】:

    听起来您的系统已将文件系统置于只读模式。在许多情况下都会发生这种情况。您应该检查 dmesg 是否有错误,并可能重新启动并进行文件系统检查。

    此外,在公共文件夹(如 /usr/local)中授予所有用户完全权限可能不是一个好主意。

    【讨论】:

    • 谢谢!简单的重新启动可以做到的事情令人惊讶。
    猜你喜欢
    • 1970-01-01
    • 2022-11-13
    • 2017-06-09
    • 2022-11-22
    • 2022-01-05
    • 2010-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多