栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

windows安装nginx莫名其妙 CreateFile()权限不够创建问题

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

windows安装nginx莫名其妙 CreateFile()权限不够创建问题

报错:

C:UsersAdministrator>nginx
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2021/05/14 20:22:43 [emerg] 2024#11660: CreateFile() "C:UsersAdministrator/conf/nginx.conf" failed (3: The system cannot find the path specified)

C:UsersAdministrator>nginx -s stop
nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
2021/05/14 20:22:52 [emerg] 2052#12692: CreateFile() "C:UsersAdministrator/conf/nginx.conf" failed (3: The system cannot find the path specified)

莫名其妙不能创建CreateFile()
百度了很久 各种各样的解决方案 都没有解决问题。最后我想既然是不能创建文件,是不是权限的问题?
于是我查看nginx文件的操作权限 果然当前用户下没有写入的权限

于是我右键单击nginx文件的属性,选择安全这一栏

如上图点击编辑修改当前用户下对此文件的权限,把对文件的写入和修改权限加上。点击确认即可。

然后就发现再运行nginx就不报错了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/603822.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号