Closed
Bug 347128
Opened 19 years ago
Closed 18 years ago
Changes to a remote calendar using ftp (without providing the username/password in the URL) are not updated on the server
Categories
(Calendar :: Provider: ICS/WebDAV, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: jefdriesen, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060802 Calendar/0.3a2+
When I subscribe to a remote calendar using FTP (without providing the username/password in the URL, e.g. ftp://server/filename.ics), I cannot make changes. After subscribing, the "authorization required" dialog is shown and the calendar is successfully downloaded after entering the username/password. When I try to modify the calendar (e.g. delete an event), the "authorization required" dialog is shown again, and the event is removed from the views. However after reloading the remote calendars the event appears again. No errors are shown on the error console.
When I change the URL to include the username/password (e.g. ftp://username:password@server/filename.ics), everything works as expected.
Reproducible: Always
Steps to Reproduce:
1. Subscribe to a remote calendar using FTP (ftp://server/filename.ics).
2. Enter correct username/password when asked.
3. Delete an event.
4. Enter correct username/password when asked.
5. Reload the remote calendar.
Actual Results:
The event is not removed from the server and reappears in the views.
Expected Results:
The event should be removed from the server.
Comment 1•19 years ago
|
||
QA wanted. I don't have an ftp server to play around with here, so we need someone with more knowledge/testing ability to poke at this. mvl, do we need ftpHooks in the ics provider too, maybe?
Component: General → Provider: ICS/Webdav
Keywords: qawanted
Reporter | ||
Comment 2•19 years ago
|
||
I did some more testing (using the venkman debugger) and realized that the second authentication dialog is not initiated by the uploading of the data. It is only used for downloading a fresh copy of the ics file, just before making changes to the calendar. Uploading the modified calendar is tried without a username/password, which fails silently without any errors (as far as I see).
BTW, I was also a little suprised to see that the streamLoader.init call (in the refresh function of calICSCalendar.js, responsible for downloading) automagically shows this authentication dialog, while the channel.asyncOpen call (in the doWriteICS function of calICSCalendar.js, responsible for uploading) does not.
Updated•19 years ago
|
QA Contact: general → ics-provider
Comment 3•19 years ago
|
||
This probably very much depends on the settings of the ftp server. Using pureftp and
(1) not allowing anonymous logins I get the message: 530 This is a private system - No anonymous login
(2) allowing anonymous logins I get the message: 550 Can't change directory to /Test.ics: No such file or directory.
BUT, creation of file works and adding the first events works. All subsequent events that can be created in Sunbird will not be written to the file. In Sunbird they are shown and can be deleted/dragged and so on. Issuing a reload does not clear the created events. After restart, everything is gone (even the first event is not loaded).
After I changed the ownership of the created file from ftp/ftp 600 to root/ftp 660, a reload of the file resulted in showing the first event (which is the the complete contents of the file). So my guess is, that the two channels (write and read channel) use different user rights.
I was never asked to enter login data.
Comment 4•19 years ago
|
||
(In reply to comment #0)
> When I subscribe to a remote calendar using FTP (without providing the
> username/password in the URL, e.g. ftp://server/filename.ics), I cannot make
> changes. After subscribing, the "authorization required" dialog is shown and
> the calendar is successfully downloaded after entering the username/password.
> When I try to modify the calendar (e.g. delete an event), the "authorization
> required" dialog is shown again, and the event is removed from the views.
> However after reloading the remote calendars the event appears again. No errors
> are shown on the error console.
>
>
> Steps to Reproduce:
> 1. Subscribe to a remote calendar using FTP (ftp://server/filename.ics).
> 2. Enter correct username/password when asked.
> 3. Delete an event.
> 4. Enter correct username/password when asked.
> 5. Reload the remote calendar.
> Actual Results:
> The event is not removed from the server and reappears in the views.
>
> Expected Results:
> The event should be removed from the server.
>
WFM with Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9a1) Gecko/20061006 Sunbird/0.3
Comment 5•19 years ago
|
||
WFM with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/20070102 Calendar/0.4a1 ID:2007010203
Reporter | ||
Comment 6•19 years ago
|
||
I tested again on the same server I used to report this case, with the latest lightning [1] and sunbird [2] builds. The problem is still present. The main difference is that the username/password is remembered now (nice work!).
There is a difference between lightning and sunbird. Lightning remains completely silent. There is no error message whatsoever. Sunbird, on the other hand, gives me a "550: filename.ics: Permission denied" error dialog when deleting the event.
The ftp server does not allow anonymous logins. Trying it anyway results in:
530-Unable to set anonymous privileges.
530 Login incorrect.
[1] Build 2007010203
[2] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070102 Calendar/0.4a1
Comment 7•19 years ago
|
||
Jef, the error message "550: filename.ics: Permission denied" sounds more like you don't have permission to change that file on the ftp server. Are you sure you set the rights correctly?
My server also dosen't allow anonymous logins, and I don't get that error message. What FTP Server software are you accessing? Do you have access to its configuration file? Maybe its a FTP Server dependant error.
Reporter | ||
Comment 8•19 years ago
|
||
I'm quite sure the permissions are fine, because I have no problems if I provide both the username and password as part of the URL (e.g. ftp://username:password@server/filename.ics). I checked with an FTP client, and all files on the server have unix-style permissions "rw-r--r--". So I don't think it's related to file permissions, because in that case providing the username/password in the URL should make no difference.
I do not have access to the server configuration. It's a server from my ISP for managing our personal webpages (users.telenet.be). I have no idea what software is used. It announces itself as "220 Telenet-ops FTP Server" and responds to SYST with "215 UNIX Type: L8".
Reporter | ||
Comment 9•19 years ago
|
||
I have some more information on the server software. It's probably a ProFTPD installation, because it responds to STAT with "211-Status of 'ProFTPD Default Installation'".
Comment 10•19 years ago
|
||
I have tested this with a proftpd server and found no problems. Try the following please:
* Create a local calendar
* Export the (empty) calendar to empty.ics
* Add an event
* Export the calendar to event.ics
Then use a normal FTP client and do the following commands. I got these commands from my proftpd server logs, this is exactly what sunbird does. If one of these commands does not work from your ftp client you may need to prepend QUOTE so that the commands are sent directly.
Lines with * are actions you should do, lines with -- are expected server responses. Make sure that the test1.ics does not exist prior to your testing, since it does not when you create a new calendar.
The first transaction is made when the calendar is subscribed to:
* try logging in as anonymous.
--530 Login incorrect.
* log in as the user you normally connect with.
--230 User moz.test logged in
* SYST
--215 UNIX TYpe: L8
* PWD
--257 "/home/moz.test/" is the current directory
* TYPE I
--200 Type set to I
* PASV
--227 Entering Passive Mode (xxx,xxx,xxx,xxx,xxx,xxx).
* SIZE /home/kewisch/test1.ics
--550 /home/kewisch/test1.ics: No such file or directory
* MDTM /home/kewisch/test1.ics
--550 /home/kewisch/test1.ics: No such file or directory
* RETR /home/kewisch/test1.ics
--550 /home/kewisch/test1.ics: No such file or directory
* PASV
--227 Entering Passive Mode (xxx,xxx,xxx,xxx,xxx,xxx).
* CWD /home/kewisch/test1.ics
--550 /home/moz.test/test1.ics: No such file or directory
Next, when the event is created, the calendar is retrieved first. This is the same transaction as above. After that, the updated calendar is uploaded:
* try logging in as anonymous.
--530 Login incorrect.
* log in as the user you normally connect with.
--230 User moz.test logged in
* SYST
--215 UNIX TYpe: L8
* PWD
--257 "/home/moz.test/" is the current directory
* TYPE I
--200 Type set to I
* PASV
--227 Entering Passive Mode (xxx,xxx,xxx,xxx,xxx,xxx).
* STOR /home/moz.test/event.ics (you can use ftp's put command here)
--226 Transfer Complete
Now you have successfully "added" the event manually. Now we go to deleting. Repeat the first set of commands, since the calendar is retrieved before the connection is made. Then repeat the second set of commands, uploading empty.ics instead of event.ics. After that do the following:
* SIZE /home/moz.test/empty.ics"
--213 <size of file>
* MDTM /home/moz.test/empty.ics"
--213 <maybe some text. This command was empty with my ftp client>
* RETR /home/moz.test/empty.ics (use your ftp client's get command)
226 Transfer Complete
There you can see where sunbird would fail. If you have any questions or are having any trouble, drop by irc.mozilla.org in #calendar, I or someone else should be able to give you quick help.
Thank you for your input so far, I hope we can solve this Problem!
Reporter | ||
Comment 11•19 years ago
|
||
I get this as output:
Subscribe:
Connected to users.telenet.be.
220 Telenet-ops FTP Server
ftp> QUOTE USER anonymous
331 Anonymous login ok, send your complete email address as your password.
ftp> QUOTE PASS anonymous
530-Unable to set anonymous privileges.
530 Login incorrect.
ftp> QUOTE USER <username>
331 Password required for <username>.
ftp> QUOTE PASS <password>
230 User <username> logged in.
ftp> QUOTE SYST
215 UNIX Type: L8
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,20,48).
ftp> QUOTE SIZE test.ics
550 test.ics: No such file or directory
ftp> QUOTE MDTM test.ics
550 test.ics: No such file or directory
ftp> QUOTE RETR test.ics
550 test.ics: No such file or directory
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,20,72).
ftp> QUOTE CWD test.ics
550 test.ics: No such file or directory
ftp> QUOTE QUIT
221 Goodbye.
ftp> QUIT
Create event:
Connected to users.telenet.be.
220 Telenet-ops FTP Server
ftp> QUOTE USER anonymous
331 Anonymous login ok, send your complete email address as your password.
ftp> QUOTE PASS anonymous
530-Unable to set anonymous privileges.
530 Login incorrect.
ftp> QUOTE USER <username>
331 Password required for <username>.
ftp> QUOTE PASS <password>
230 User <username> logged in.
ftp> QUOTE SYST
215 UNIX Type: L8
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,20,48).
ftp> QUOTE SIZE test.ics
550 test.ics: No such file or directory
ftp> QUOTE MDTM test.ics
550 test.ics: No such file or directory
ftp> QUOTE RETR test.ics
550 test.ics: No such file or directory
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,20,72).
ftp> QUOTE CWD test.ics
550 test.ics: No such file or directory
ftp> QUOTE QUIT
221 Goodbye.
ftp> QUIT
Connected to users.telenet.be.
220 Telenet-ops FTP Server
ftp> QUOTE USER anonymous
331 Anonymous login ok, send your complete email address as your password.
ftp> QUOTE PASS anonymous
530-Unable to set anonymous privileges.
530 Login incorrect.
ftp> QUOTE USER <username>
331 Password required for <username>.
ftp> QUOTE PASS <password>
230 User <username> logged in.
ftp> QUOTE SYST
215 UNIX Type: L8
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,19,164).
ftp> PUT event.ics test.ics
200 PORT command successful
550 test.ics: Permission denied
ftp> QUOTE QUIT
221 Goodbye.
ftp> QUIT
Delete event:
Connected to users.telenet.be.
220 Telenet-ops FTP Server
ftp> QUOTE USER anonymous
331 Anonymous login ok, send your complete email address as your password.
ftp> QUOTE PASS anonymous
530-Unable to set anonymous privileges.
530 Login incorrect.
ftp> QUOTE USER <username>
331 Password required for <username>.
ftp> QUOTE PASS <password>
230 User <username> logged in.
ftp> QUOTE SYST
215 UNIX Type: L8
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,19,164).
ftp> QUOTE SIZE test.ics
550 test.ics: No such file or directory
ftp> QUOTE MDTM test.ics
550 test.ics: No such file or directory
ftp> QUOTE RETR test.ics
550 test.ics: No such file or directory
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,19,242).
ftp> QUOTE CWD test.ics
550 test.ics: No such file or directory
ftp> QUOTE QUIT
221 Goodbye.
ftp> QUIT
Connected to users.telenet.be.
220 Telenet-ops FTP Server
ftp> QUOTE USER anonymous
331 Anonymous login ok, send your complete email address as your password.
ftp> QUOTE PASS anonymous
530-Unable to set anonymous privileges.
530 Login incorrect.
ftp> QUOTE USER <username>
331 Password required for <username>.
ftp> QUOTE PASS <password>
230 User <username> logged in.
ftp> QUOTE SYST
215 UNIX Type: L8
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,19,164).
ftp> PUT empty.ics test.ics
200 PORT command successful
550 test.ics: Permission denied
ftp> QUOTE SIZE test.ics
550 test.ics: No such file or directory
ftp> QUOTE MDTM test.ics
550 test.ics: No such file or directory
ftp> GET test.ics
200 PORT command successful
550 test.ics: No such file or directory
ftp> QUOTE QUIT
221 Goodbye.
ftp> QUIT
Reporter | ||
Comment 12•19 years ago
|
||
I think the error is caused by the anonymous login attempt. I don't understand why, but if I skip that, everything works fine.
The next question is of course: Is it possible to remove this anonymous login attempt in sunbird/lightning?
Comment 13•19 years ago
|
||
Bug 273478 deals with problems of anonymous FTP and remote calendars.
Comment 14•19 years ago
|
||
ftp> QUOTE CWD test.ics
550 test.ics: No such file or directory
Just FYI: This is expected. You're asking to Change Working Directory to the test.ics DIRECTORY, which doesn't exist.
Comment 15•19 years ago
|
||
Thanks to Phillip and Jef's awesome QA I am removing the QA Wanted flag on this.
I think there are two issues at work here.
1. The anonymous FTP issue. That is probably a bug with sunbird and should be tracked in Bug 273478 (See Martin's comment 13).
2. I think there is a problem with the address being used to push content to Jef's FTP server.
It is this part of Jef's FTP log that bothers me:
ftp> QUOTE PWD
257 "/" is current directory.
ftp> QUOTE TYPE I
200 Type set to I
ftp> QUOTE PASV
227 Entering Passive Mode (195,130,132,85,19,164).
ftp> PUT event.ics test.ics
200 PORT command successful
550 test.ics: Permission denied
I think what is happening is that you have logged in as anonymous and the server is not allowing the anonymous user to PUT content to this location.
While, yes, that is a problem with Jef's FTP server's settings, I do not think it is an isolated problem. I think this is something we will need to look into in Sunbird.
This may be a dupe of 273478, I'm not entirely sure. But, I think it is time to turn this over to the developers now.
Jef, you've done good work on this bug. If you'd like to help out with more calendar-qa, please check us out at http://wiki.mozilla.org/Calendar:QA_Home
Since we still can't confirm, I am leaving as unconfirmed until the devs make a decision on whether to dupe this or confirm it by changing settings on an FTP server.
Keywords: qawanted
Reporter | ||
Comment 16•19 years ago
|
||
(In reply to comment #14)
> ftp> QUOTE CWD test.ics
> 550 test.ics: No such file or directory
>
> Just FYI: This is expected. You're asking to Change Working Directory to the
> test.ics DIRECTORY, which doesn't exist.
I know, but I wanted to test with exactly the same commands Philipp gave me.
(In reply to comment #15)
> I think what is happening is that you have logged in as anonymous and the
> server is not allowing the anonymous user to PUT content to this location.
The server clearly won't let me login anonymously. I can't get past the login sequence.
I'm having problems only after the failed anonymous login, and trying again with the correct username/password. That's made me think this could be related to the ftp daemon dropping privileges to the anonymous user after the first attempt. And after that the daemon is probably not allowed anymore to 'upgrade' itself to the more privileged normal user. It sounds like a reasonable explanation to me, but I could be completely wrong. This is most likely a bug on the server side.
I think one solution that should work, is making the second connection in another ftp session. After a failed login, disconnect and reconnect with asking a password from the user.
The workaround for the moment is adding the username/password to the URL. But that is exactly what I was trying to avoid. (Especially the password, but maybe it also works if I provide only the username. I haven't tested that yet.)
Comment 17•19 years ago
|
||
Your login being rejected after an anonymous attempt must definitly be a configuration issue on the server side. I have a proftpd server running that dosen't bork and it also separates privileges.
Making an anonymous connection is done by the netwerk stack, so correcting this would also affect the way FTP is handled in firefox and other mozilla products. I do think this behavior should be changed, but thats a much bigger question than my own opinion. See http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp#1643 for details on why the anonymous connection is made (thanks mvl!).
I think urls with ftp://username@host/ should automatically ask for the user in a dialog, since the user obviously wants to send a username. Currently the user is stripped.
You might want to write your provider an email that something must be configured wrong, maybe you are lucky and they will change it. Otherwise I suggest filing a bug to whatever product/component the ftp protocol handler is in, in case there is not already a such bug.
Jef, are you ok with my suggestion? In that case this bug should be closed.
Reporter | ||
Comment 18•19 years ago
|
||
(In reply to comment #17)
> I think urls with ftp://username@host/ should automatically ask for the user in
> a dialog, since the user obviously wants to send a username. Currently the user
> is stripped.
Providing the username in the url works fine here. I get prompted for a password and can modify my calendar without any problems. That behavior seems consistent with the source code you mentioned.
Maybe this is worth mentioning in the documentation as a workaround for the anonymous ftp issue. I (and probably others too) want to avoid exposing my password in the url. I think a password should never be stored in an URL like that. We have a password manager for that task. And because the password in the URL is not masked with asterisks (like in a real password field), it is visible to anyone watching over my shoulder. But with this workaround, I can be avoid that.
For the rest I agree with you. The anonymous FTP issue is already tracked in bug 273478. And the remaining problem is a server configuration issue. But before I close this bug, I wanted to mention that lightning/sunbird should report the error to the user, instead of ignoring it silently!
Comment 19•18 years ago
|
||
Per comments 17 and 18, this bug can be closed (actually sounds like WFM from the comments).
Thanks a bunch for your help and cooperation on this Jef.
Jef or Phillip, if you want to file a FTP bug, I did a search for duplicate issues and did not find anything, but I don't feel confident that I understand this issue enough to file a bug on it. The FTP bugs should be filed under Product: "Core" and Component: "Network:FTP".
--> Marking WFM.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•