我有一个托管Firebase的Jekyll博客。使用RubyInstaller for Windows - 有时在部署到Firebase之后,由于Permission denied @ rb_sysopen
这似乎只是在工作几个小时之后随机发生,请参阅下面的日志(在成功构建和部署之后):
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>jekyll build
Configuration file: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_config.yml
Source: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog
Destination: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.598 seconds.
Auto-regeneration: disabled. Use --watch to enable.
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>firebase deploy
1
=== Deploying to 'Liukang-blog'...
i deploying hosting
i hosting: preparing _site directory for upload...
+ hosting: 9 files uploaded successfully
+ Deploy complete!
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>jekyll build
Configuration file: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_config.yml
Source: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog
Destination: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.573 seconds.
Auto-regeneration: disabled. Use --watch to enable.
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>firebase deploy
1
=== Deploying to 'Liukang-blog'...
i deploying hosting
i hosting: preparing _site directory for upload...
+ hosting: 9 files uploaded successfully
+ Deploy complete!
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>jekyll build
Configuration file: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_config.yml
Source: C:/Users/Liukang/Google Drive/MY-BLOG/BLOG/liukang_blog
Destination: C:/Users/Liukang/Google Drive/MY-BLOG/BLOG/liukang_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.581 seconds.
Auto-regeneration: disabled. Use --watch to enable.
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>firebase deploy
1
=== Deploying to 'Liukang-blog'...
i deploying hosting
i hosting: preparing _site directory for upload...
+ hosting: 9 files uploaded successfully
+ Deploy complete!
C:\Users\Liukang\Google Drive\MY-BLOG\liukang_blog>jekyll build
Configuration file: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_config.yml
Source: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog
Destination: C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
jekyll 3.6.2 | Error: Permission denied @ rb_sysopen - C:/Users/Liukang/Google Drive/MY-BLOG/liukang_blog/firebase-debug.log
我无法打开 firebase-debug.log 或将其删除。我可以通过关闭计算机来“解决”这个问题,这很令人沮丧。
编辑退出终端似乎也有效。
这是由于没有正确的文件权限造成的 - 如果是这样,我该如何设置正确的权限,这样就不会再发生了?
答案 0 :(得分:0)
您需要更改MY-BLOG中文件/文件夹的权限,方法是将其归您所有者所有。只需转到My-BLOG文件夹并尝试使用以下命令获取Windows中所有文件和文件夹的所有权。
takeown /f <foldername> /r /d y
takeown /F <filename>
详细了解Windows http://www.itprotoday.com/management-mobility/taking-ownership-file-or-folder-command-line
中的permisisions