Ticket #3587 (closed defect: fixed)

Opened 11 months ago

Last modified 10 months ago

Gajim don"t have permission to write a transfered file in other directory that user's directory

Reported by: Edtech Owned by: asterix
Priority: normal Milestone: 0.11.4
Component: usability Version: 0.11.3
Severity: normal Keywords:
Cc: OS: Windows

Description (last modified by asterix) (diff)

On Windows Vista, I can't save a file received by the file transfert in my personnal directories. It' perhaps because I move my directories to other drives :

Example :
"Edtech" = C:\Users\Edtech
"Edtech\Documents" = D:\documents
"Edtech\Images" = D:\Pictures
"Edtech\Vidéo" = I:\Videos

I can save file only in "Edtech" directory and not in "Edtech\Documents", "Edtech\Images", etc.

Attachments

TransfertGajimVista.jpg (111.8 kB) - added by Edtech 11 months ago.
File transfert error

Change History

follow-up: ↓ 2   Changed 11 months ago by asterix

  • description modified (diff)

I don't know how rights works under windows, but if the user who launch Gajim has right to write in those folder, I don't see why Gajim can't save file there :/

Changed 11 months ago by Edtech

File transfert error

in reply to: ↑ 1   Changed 11 months ago by anonymous

I believe that Gajim (or the GTK) does not understand the virtual files of Vista. It accepts to create files in “Edtech” only (C:\users\Edtech) but not elsewhere. It does not understand that the virtual file “Documents” (D:\Document) belongs to the same user.

Another problem, if I go in “Edtech”, the directory is empty instead of containing the virtual under-directories.

follow-up: ↓ 4   Changed 11 months ago by asterix

you should look in GTK bugtracker if there is something like that. Gajim only uses gtk FileChooser? widget.

in reply to: ↑ 3   Changed 11 months ago by Edtech

I have the same problem with Windows XP : I change the emplacement of "My documents" to "D:\Documents" and Gajim refused to write the files with error "acces refused". I didn't find a bug opened on this subject in the GTK. Perhaps that it is already corrected.

PS: Anonymous response is from me

  Changed 11 months ago by asterix

ok the problem is os.access() call. see here. In Gajim we do os.access(dirname, os.W_OK)

I tested here and under windows os.access('e:\\folder', W_OK) returns False

so bug in python os module under windows?

  Changed 10 months ago by asterix

it's indeed some kind of bug in python (or rather in windows ...)

from comp.lang.python: if a folder is marked read-only on Windows, it doesn't mean that you can only read from it. The read-only bit is a legacy thing, anyway, since you are supposed to use ACLs to mark a folder as read-only (by only granting write access to those who are supposed to write)

As the read-only bit is otherwise unused, Explorer uses it to mark folders as being special, such a My Documents.

It's why os.access() returns false. In python 2.5.2 They'll maybe change the behaviour of os.access() on folder under windows to always return True. (ACL the the only way to really do this, but not available under Win9x, so will be in python 2.6)

For now I'll just remove this os.access() test under windows.

  Changed 10 months ago by asterix

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.12

(In [9091]) os.access() on a folder under windows doesn't mean anything. fixes #3587

  Changed 10 months ago by asterix

(In [9092]) os.access() on a folder under windows doesn't mean anything. fixes #3587

  Changed 10 months ago by asterix

  • milestone changed from 0.12 to 0.11.4

Add/Change #3587 (Gajim don"t have permission to write a transfered file in other directory that user's directory)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.