FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

FTP file permissions

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
Petr J.
Posted via mailing list.





PostPosted: Tue Nov 25, 2008 12:29 pm    Post subject: FTP file permissions Reply with quote

Hi,

I have an web project on remote FTP and file example.php (permission 666).

When I'm uploading this file from local, Netbeans does:

1. upload file (it creates file example.php.new~ 644)
2. rename, owerwritten (example.php.new~ example.php)

New version of file has on ftp permission 644.

For new file ok, but for old files that isn't good.

Is it any result?

Thank you for respond

Petr J.

--

petrovo

Czech Republic

Mobil: +420 777 983 461
ICQ: 267956451
Jabber: address-removed
Web: www.petrovo.info
Email: address-removed
address-removed
Back to top
THE_AI



Joined: 20 Nov 2008
Posts: 46

PostPosted: Tue Nov 25, 2008 1:29 pm    Post subject: Reply with quote

Yes, the same happens to me.
But what disturb me more is the fact that it makes name.php.new .
I believe there should be an option to choose what you want to do - create a new file or override existing one.
Imagine if you want to update an ftp project with 1000 files, what should I do with 1000 files that are ending on .new ?
Back to top
View user's profile Send private message
Tomas Mysik
Posted via mailing list.





PostPosted: Tue Nov 25, 2008 2:08 pm    Post subject: FTP file permissions Reply with quote

Hi Petr,
please, find my comments inline. Thanks.

Dne úterý 25 listopadu 2008 Petr J. napsal(a):
Quote:
I have an web project on remote FTP and file example.php (permission 666).

When I'm uploading this file from local, Netbeans does:

1. upload file (it creates file example.php.new~ 644)
2. rename, owerwritten (example.php.new~ example.php)

Right, this behaviour is intentional; we are trying to avoid any data loss.
The same scenario happens while downloading files.

Quote:
New version of file has on ftp permission 644.

For new file ok, but for old files that isn't good.

In fact, right now, NB doesn't care about file permissions at all (we don't
read them, we don't set them). So all the file/directory permissions are the
default ones set by a remote server.

Quote:
Is it any result?

Not sure whether I understand your question, correct me if I'm wrong, please.
The issue here is that the old file had another rights than the new one,
right? Yes, this can happen and it's an issue - NB should probably try to set
the permissions for the new file according to the old ones. I filed an issue,
you can find it here:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=153860

Thanks for catching that,
Tomas
--
Tomas Mysik
address-removed
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Tue Nov 25, 2008 2:22 pm    Post subject: FTP file permissions Reply with quote

Hi,
my comments are inline, thanks.

Dne úterý 25 listopadu 2008 THE_AI napsal(a):
Quote:
Yes, the same happens to me.

Issue filed, see http://www.netbeans.org/nonav/issues/show_bug.cgi?id=153860.

Quote:
But what disturb me more is the fact that it makes name.php.new .

I believe there should be an option to choose what you want to do - create
a new file or override existing one.

As I wrote, we are trying to avoid any data loss (in the past, we had a few
such issues). That's the reason for the steps while uploading/downloading
files:
- transfer the file using "new" name
- if it's OK, try to directly rename the file (not all the servers support
this)
- if it fails, rename the current file to "old"
- rename the "new" to the current
- remove the "old" file
(Of course, try to recover if any above operation fails.)

Quote:
Imagine if you want to update an ftp project with 1000 files, what should I
do with 1000 files that are ending on .new ?

Not sure what the problem here is, please, correct me if I'm wrong - if you
can find any "new" or "old" files on your server, please file an issue with
steps to reproduce if possible:
http://www.netbeans.org/nonav/issues/enter_bug.cgi?component=php&issue_type=DEFECT
(subcomponent ftp_support). Or are there any other difficulties related to
this behaviour?

Thanks,
Tomas
--
Tomas Mysik
address-removed
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB