WIndows: either set_dir_readwrite and/or set_dir_readonly are not doing what they should

Bug #820350 reported by Natalia Bidart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Won't Fix
High
Brian Curtin

Bug Description

Calling set_dir_readonly over a dir, and then set_dir_readwrite, do not restore the original perms over a directory.

Changed in ubuntuone-client:
assignee: nobody → Alejandro J. Cura (alecu)
tags: added: u1-zomg-windows
Changed in ubuntuone-client:
importance: Undecided → High
status: New → Triaged
description: updated
tags: added: u1-windows-skipped-test
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

All the failing tests are skipped with the decorator: skip_if_win32_and_uses_readonly

Changed in ubuntuone-client:
importance: High → Medium
tags: added: u1-windows
Changed in ubuntuone-client:
assignee: Alejandro J. Cura (alecu) → Brian Curtin (brian.curtin)
Changed in ubuntuone-client:
importance: Medium → High
Changed in ubuntuone-client:
status: Triaged → In Progress
Revision history for this message
Brian Curtin (brian.curtin) wrote :

Here's what the ACLs look like on file creation, then a run through each function

==============================
open("acltest\\test", "w")
==============================
>cacls test
C:\canonical\dev\build\working\ubuntuone-client-820350\acltest\test
BUILTIN\Administrators:(ID)F
 NT AUTHORITY\SYSTEM:(ID)F
 BUILTIN\Users:(ID)R
 NT AUTHORITY\Authenticated Users:(ID)C

==============================
windows.set_file_readonly("acltest\\test")
==============================
>cacls test
C:\canonical\dev\build\working\ubuntuone-client-820350\acltest\test
BUILTIN\Administrators:(OI)(CI)(special access:)
 READ_CONTROL
 SYNCHRONIZE
 FILE_GENERIC_READ
 FILE_GENERIC_WRITE
 FILE_READ_DATA
 FILE_WRITE_DATA
 FILE_APPEND_DATA
 FILE_READ_EA
 FILE_WRITE_EA
 FILE_READ_ATTRIBUTES
 FILE_WRITE_ATTRIBUTES

SEVENLAPTOP\brian:(OI)(CI)(special access:)
 READ_CONTROL
 SYNCHRONIZE
 FILE_GENERIC_READ
 FILE_READ_DATA
 FILE_READ_EA
 FILE_READ_ATTRIBUTES

==============================
windows.set_file_readwrite("acltest\\test")
==============================
>cacls test
C:\canonical\dev\build\working\ubuntuone-client-820350\acltest\test
Everyone:(OI)(CI)(special access:)
 READ_CONTROL
 SYNCHRONIZE
 FILE_GENERIC_READ
 FILE_READ_DATA
 FILE_READ_EA
 FILE_READ_ATTRIBUTES

BUILTIN\Administrators:(OI)(CI)F
SEVENLAPTOP\brian:(OI)(CI)F

Revision history for this message
Brian Curtin (brian.curtin) wrote :

Er, since this issue is more about directories, here's the relevant output:

====================
after creation *and* after being marked read-only
====================
C:\canonical\dev\build\working\ubuntuone-client-820350\acl
BUILTIN\Administrators:(ID)F
BUILTIN\Administrators:(OI)(CI)(IO)(ID)F
NT AUTHORITY\SYSTEM:(ID)F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(ID)F
BUILTIN\Users:(OI)(CI)(ID)R
NT AUTHORITY\Authenticated Users:(ID)C
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(ID)C

====================
after being marked read-write
====================

C:\canonical\dev\build\working\ubuntuone-client-820350\acl
Everyone:(OI)(CI)(special access:)
 READ_CONTROL
 SYNCHRONIZE
 FILE_GENERIC_READ
 FILE_READ_DATA
 FILE_READ_EA
 FILE_READ_ATTRIBUTES
BUILTIN\Administrators:(OI)(CI)F
SEVENLAPTOP\brian:(OI)(CI)F

Changed in ubuntuone-client:
status: In Progress → Triaged
Revision history for this message
Brian Curtin (brian.curtin) wrote :

lp:~brian.curtin/ubuntuone-client/820350-fix-readonly-readwrite effectively fixes these methods in and of themselves, and generally within the platform tests, as well as use in real life. However, the entire test suite does not like these changes very much with a lot of tests breaking.

I believe the bulk of the remaining work will be to make sure the test suite plays nicely. It seems possible that some test(s) didn't clean up properly and a directory or directories were left in a bad state, causing some of these failures. This was true in a few cases, where a test was failing because it expected to already have read-write access, and adding a read-write call at the top of the test made it pass as expected.

Changed in ubuntuone-client:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.