Bug 91000 - Syncevolution fails if /home not readable
Summary: Syncevolution fails if /home not readable
Status: RESOLVED FIXED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: SyncEvolution (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Patrick Ohly
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 20:41 UTC by Graham Cobb
Modified: 2016-09-21 08:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
walk bottom up instead of top down (2.71 KB, patch)
2015-08-14 16:47 UTC, Patrick Ohly
Details | Splinter Review

Description Graham Cobb 2015-06-16 20:41:05 UTC
Note: version 1.5.1

If syncevolution has never been run before (or ~/.config/syncevolution is removed), it fails if all the directories in the $HOME path are not world readable.

Error displayed is:

[ERROR] /home: Permission denied

To reproduce:

As root:

chmod o=x /home

As user:

rm -rf ~/.config/syncevolution

syncevolution --daemon=no --configure --template none username= password= printChanges=1 loglevel=4 Exchange@FilesMaster


Here is an strace extract showing the case when /home is readable:

.
.
.
access("/home/cobb/.config/syncevolution/config.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/home/cobb/.config/syncevolution/filesmaster/config.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/home/cobb/.config/syncevolution/filesmaster/peers/exchange/config.ini", F_OK) = -1 ENOENT (No such file or directory)
open("/home/cobb/.config/syncevolution/.internal.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/home", R_OK|X_OK)              = 0
access("/home/cobb", R_OK|X_OK)         = 0
access("/home/cobb/.config", R_OK|X_OK) = 0
access("/home/cobb/.config/syncevolution", R_OK|W_OK|X_OK) = -1 ENOENT (No such file or directory)
mkdir("/home/cobb/.config/syncevolution", 0700) = 0
.
.
.

The "access("/home", R_OK|X_OK)" fails if /home is executable but not readable.
Comment 1 Graham Cobb 2015-06-16 20:49:29 UTC
Actually, the problem is worse: it doesn't just happen if ~/.config/syncevolution does not exist.  Presumably it happens when various directories or files need to be created in the .config tree.
Comment 2 Patrick Ohly 2015-08-14 16:47:24 UTC
Created attachment 117691 [details] [review]
walk bottom up instead of top down

This patch is currently pending automatic testing. Manual testing shows that it addresses the issue.
Comment 3 Patrick Ohly 2016-09-21 08:30:55 UTC
Part of for-master/master-next, will be in SyncEvolution 1.5.2.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.