Why NetBeans ( php - remote project ) change permission of files to 0600?

3

I'm using NetBeans for editing some php files ( in a php project ) at remote server.

all go normal, but when saving the edited file using NetBeans, the file's permissions are set to 0600 by default, making me not able to browse to the file at the remote server till chmod it to 0777 or else.

the main project folder have permissions 0777 and owned to me. Also the all sub-folders and files under the project's folder have the same permission 0777.

*This is a private server. So, No problem about having world-writable files.

What is the problem ? And how to get over it ?

I'm using Ubuntu 10.04, NetBeans 6.9 ( Final Edition ). The Connection to the remote server is via FTP in Passive Mode.

code2be

Posted 2010-06-28T15:30:13.080

Reputation: 133

1Also, if you're using FTP in today's environment, you're just asking for it. SCP/SFTP is the new black. – Fiasco Labs – 2014-11-12T03:08:41.863

30777? Seems like you're being entirely too lax with your permissions... – Billy ONeal – 2011-01-20T02:56:17.003

2Rule of thumb: If you want to 0777 (world-writable) something, there's either something wrong in your setup or logic. Bonus: If you want to do this on a server (facing the interwebz), there's a good chance you just opened a backdoor. – Bobby – 2013-06-17T07:15:34.257

Answers

4

Open the project's properties, select category "Run Configuration", check "Preserve Remote File Permissions".

Just ran into this myself.

Steve Clay

Posted 2010-06-28T15:30:13.080

Reputation: 230

I do not see the check box using Netbeans 7.0.1. Has it been moved? – k0pernikus – 2012-05-08T16:34:57.537