Only Ubuntu One folder syncing on Windows 7

Bug #1018499 reported by Robert Bethke
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Triaged
Medium
Ubuntu One Client Engineering team

Bug Description

I have Ubuntu One (3.0.2) installed on a windows 7 SP1 box. The Ubuntu One folder will sync, but no others will not. I have files from my laptop that should be sent to my desktop and vice versa. I will provide the log file once I'm back at home.

Revision history for this message
Robert Bethke (robert-bethke) wrote :

It appears to be a problem with permissions based upon my log file.

Revision history for this message
Jon Hanna (jonhanna) wrote :

If it's permissions-related, then adding what permissions are in effect may help resolve it.

Revision history for this message
Robert Bethke (robert-bethke) wrote :

Authenticated Users, SYSTEM, Administrators (Windows/Administrators), Users (Windows/Users) - all have modify, read, write, execute, and list folder contents access rights.

Revision history for this message
Jon Hanna (jonhanna) wrote :

Thanks Robert, because in looking at this, I realise that the second part of bug 1017450 is the same as this.

Also, experimenting, I found that my duplication of your issue is alleviated by running Ubuntu One as administrator.

Like you, I have all the main rights on the folder in question on all the main accounts, so I can't see right now why I should need to run as admin.

Changed in ubuntuone-client:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Robert Bethke (robert-bethke) wrote :

Spot on, I went and ran both the control panel and syncdaemon applications with admin rights, and that appears to resolve the issue. If I only ran the control panel elevated it didn't seem to fix the problem, I had to make sure syncdaemon was marked to run as an admin as well.

Revision history for this message
Jon Hanna (jonhanna) wrote :

I found that running the control panel elevated then ran the syncdaemon elevated, providing that the syncdaemon wasn't already running. Otherwise, it would just use the current non-elevated instance.

Since I don't want to run elevated, and doing so doesn't work well with the automatic start on log-on, I'd still like to figure out what permissions issue is at play here, but can't for the life of me.

Revision history for this message
Leo Arias (elopio) wrote :

Hey guys,

I tried a couple of things to reproduce this bug, but everything seems to work here without problems.. First, my syncdaemon is running as my logged user, not as admin.

I created a folder on my home, and added it for synchronization:
$ u1sdtool.exe --create-folder=C:\Users\elopio\udf

I also tried to sync the documents folder, that's where you are having problems:
$ u1sdtool.exe --create-folder=C:\Users\elopio\Documents

I can't reproduce it. Am I missing some step? How did you create that user designated folder?

Jon, it might be useful if you send us your log too.

Thanks a lot!
pura vida.

Changed in ubuntuone-client:
status: Confirmed → Incomplete
Revision history for this message
Daniel Wennberg (daniel-wennberg) wrote :
Download full text (3.5 KiB)

I had a similar problem on Windows 7, except that a small number of files in My Documents actually did sync from the beginning; the rest, however, required Ubuntu One running as administrator to sync. I use a folder sync utlilty called Memeo AutoSync to keep a bidirectionally synced copy of My Documents on an external drive, and I realized that the files syncing from the beginning were files that Memeo has never written to (they were created in My Documents, and the copy on the external drive has never been edited). Robert and Jon, have your non-syncing files been created or moved in unconventional ways (for instance by cheap/bad software)?

It appears that Memeo always writes files and folders with the permissions Robert listed in #3 (the default permissions for objects without special restrictions, lets call them general permissions). But the home directory has its own default permissions, and it seems like Ubuntu One only works with these unless running with admin rights. This might sound funny considering that the home permissions are in many ways more restrictive than the general permissions, but perhaps the limitation is related to that Ubuntu One only will sync of folders inside home? (My guess is that Ubuntu One requires the necessary permissions granted specifically to the current user; the current user being in a group with the necessary permissions is not enough.)

Permissions are inheritable, and I suppose that any well written program, utlilty, shell extension etc. will respect this unless there's a reason not to. Hence, any file in the My Documents folder will have home permissions, and our problem would never occur. Perhaps the lack of flexibility with permissions could be considered a bug in Ubuntu One, but I primarily blame Memeo AutoSync for not respecting inheritable permissions. I'll go looking for a better folder sync utility.

There is a simple way to fix the permissions for the affected files:
1. Make sure that the parent folder of the contents you want to sync (the one at the home directory level, in my case the My Documents folder) has the home permissions - it probably will. To check, open the folder properties and go to the "Security" tab. The following users/groups should have full control ("Allow" checked on all lines except "Special permissions"): "SYSTEM", "<username> (<computer-name>\<username>)" and "Administrators (<computer-name>\Administrators)". No other users or groups should be listed. If anything is wrong, changing it might be difficult, but not impossible; play around with changing owner of the folder etc.

2. Force all the contents of this folder to inherit its permissions: While still in the "Security" tab, click "Advanced", then click "Change Permissions...". Check the box labeled "Replace all child permissions with inheritable permissions from this object", click "OK" and click "Yes" in the warning dialog.

Now Ubuntu One should work with all files in this folder. To make the fix permanent, stop using the bad software. If you want to continue using both it and Ubuntu One, you will have to repeat the described procedure at regular intervals to keep everyhting in sync.

The procedure will also work i...

Read more...

Revision history for this message
Daniel Wennberg (daniel-wennberg) wrote :

Turns out, the My Documents folder (and possibly other folders in the home directory) also contains system protected junctions, so I DO NOT recommend using the procedure I described in the previous post. Instead, just do the following:
1. Move all the contents of the folder you want to sync (My Documents etc.) to somewhere else, such as a temp folder on your desktop. Make sure everything is removed, so that the original folder is empty (not counting that hidden/protected system stuff).
2. Copy-paste it all back again. DO NOT drag and drop, cut-paste etc., only copy-paste will work (new copies of the files have to be created). The folder will look just as it did before, but all the content will now have inherited home permissions, and Ubuntu One will be able to sync it. You can delete the temp folder.

However simple this solution is, I think it would be a big improvement if Ubuntu One would relax its permissions requirements a little bit. The way it is now, you can never quite trust that everything is synced when you need it.

Revision history for this message
Robert Bethke (robert-bethke) wrote :

I added Everyone to the permissions in my documents folder and made sure to replace the child object permissions. Now ubuntu one works without elevating the service. Is it possible to have the daemon utilize the same rights as the user running it?

Changed in ubuntuone-client:
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
importance: Undecided → Medium
status: Incomplete → Triaged
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.