如何在netbeans php插件通过FTP上传文件时控制文件权限 [英] How to control the file permissions when the netbeans php plugin uploads a file with FTP
问题描述
每当netbeans执行ftp上传时,文件将以权限设置为640上传。这会导致PHP抛出以下错误:
警告:未知:未能打开流:许可被拒绝在未知的行0
致命错误:未知:未能打开所需'/Library/WebServer/Documents/notes/index.php'(第0行
虽然我可以在命令提示符下用 chmod o + r ./*
清理它,但它会导致netbeans在我下次运行时重新同步整个项目将权限设置回640.
我需要一种方式让netbeans上传文件的权限设置为644。
如果您不想更改远程文件权限,请确保在项目属性>运行配置下的保留远程文件权限复选框。 b
Whenever netbeans preforms an ftp upload the files are uploaded with the permissions set to 640. This causes PHP to throw the following error:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/Library/WebServer/Documents/notes/index.php' (include_path='.:/usr/local/php5/lib/php') in Unknown on line 0
While I can clean it up with a quick chmod o+r ./*
in the command prompt it causes netbeans to resynchronize the entire project next time I hit run which in turn sets the permissions back to 640.
I need a way to make netbeans upload the files with permissions set to 644.
Make sure the checkbox for "Preserve Remote File Permissions" under Project Properties > Run Configuration is checked, if you want to not change remote file permissions.
这篇关于如何在netbeans php插件通过FTP上传文件时控制文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!