如何授予 Sublime Text 3 对 Web 服务器的 DocumentRoot 中的文件的写权限? [英] How to give Sublime Text 3 write permission to files in web server's DocumentRoot?

查看:20
本文介绍了如何授予 Sublime Text 3 对 Web 服务器的 DocumentRoot 中的文件的写权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Mac OS 操作系统进行一些本地开发,我不想更改 Apache 的默认文档根目录,即 /Library/WebServer/Documents/

I use Mac OS operating system for doing some local development and I don't want to change the default document root of Apache, which is /Library/WebServer/Documents/

我把我的项目放在那个目录下.但是当我编辑文件时,Sublime Text 通常会在保存更改时要求输入密码.在不将项目移动到受保护较少的位置的情况下,如何让 Sublime Text 以完全权限访问这些文件夹和文件?将所有者组更改为某些内容并将 Sublime Text 添加到该组中怎么样?Apache 用户也必须在该组中才能允许它进行文件操作?另一种选择是将 Sublime Text 添加到 _www 组和 chown'ing _www 组的文档根目录?

I put my projects under that directory. But when I editing files, Sublime Text usually asks for the password when saving the changes. Without moving the projects to a less protected location, how can I let Sublime Text access those folders and files with full permission? What about changing the owner group to something and adding Sublime Text into that group? Apache user also must be in that group in order to allow it do file operations? Another option could be adding Sublime Text to _www group and chown'ing document root for _www group?

推荐答案

非命令行是:

  • 打开 Finder
  • 转到文件夹
  • 右键单击
  • 获取信息
  • 有一个分享&权限区域
  • 如果一切都是灰色的,只需点击挂锁
  • 点击加号
  • 添加您的 mac 用户
  • 设置读取&写权限

完成.崇高的文字现在可以保存东西

Done. Sublime text can save stuff now

这篇关于如何授予 Sublime Text 3 对 Web 服务器的 DocumentRoot 中的文件的写权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆