2

我试图让我的 ebextensions 配置工作以创建一个临时文件夹并为其授予权限,但它不起作用。

commands:
  00mkdir:
    command: mkdir C:\tmp\
  01fix_perms:
    command: cacls C:\tmp /t /e /g Everyone:f

这是在 .ebextensions 的 00_temp.config 中。我正在使用 MS Visual Studio 上传到 AWS Beanstalk。但是我们仍然没有得到临时文件夹。

4

1 回答 1

2

Use double backslashes. Such as in

commands: mkdir C:\\tmp\\

Same for the cacls command, of course. I have just done a test run with my EB configuration and it works. If for some reason this does not work for you, check the following:

  • Make sure your .ebextensions*.config files are definitely in the zip file (some zip programs ignore dot-prefixed files by default)
  • Make sure that you have SPACES in the configuration file for indentation (not tabs). To be sure, use something like TextPad.
  • For other problems I had, I have found good information in C:\cfn\log
  • I assume that you test the creation of the directory by connecting with MSTSC to the instance; if you only test it through your application, some other issues (permissions) may cause the problem.
于 2013-10-29T02:32:08.307 回答