如何在netbeans php插件通过FTP上传文件时控制文件权限 [英] How to control the file permissions when the netbeans php plugin uploads a file with FTP

查看:199
本文介绍了如何在netbeans php插件通过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屋!

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