Review Request: Copy files instead of moving if parent dir is not writable

Lamarque Vieira Souza lamarque at kde.org
Tue Mar 27 16:22:35 BST 2012



> On March 27, 2012, 2:30 p.m., Thomas Lübking wrote:
> > Does the new patch actually *silently* skip move impossible attempts??
> > Excuse my ignorance, but why are system resources actually needed to be *moved* anywhere by a random user - what means they're now gone in their original location (and for everyone else)
> > This does not sound as if the current move has a problem, but the design of those private activities has (single user approach -> fix that by logging him in as root and watch the project fail ;-)

Yes, the new patch silently skips moving impossible attempts. I tested it here and we do not need to move the .desktop file to add the app to the homescreen. Skipping the move seems to fix the other problem described in #296808, now the containments are not empty after a reboot, I still need to figure out why this change fixes that problem (debugging nepomuk is not easy :-/).

Private activities are intended to protect data from different persons, not user accounts (like it usually is the case in Linux/Unix). Everybody logs in using the same non-root account and to access a private activity the person must authenticate yourself first. The itention is to treat a private activity as if it is different user account but the kde daemons (kactivitymanager, nepomuk, kded, contourd, etc) were not designed to authenticate users so we are resorting to encfs for that. With encfs the person using the device must supply a password to mount the encrypted folder and access the private data. One use case for that is a parent that creates a "Work" activity with data from his/her work, the parent also lends the device to his/her kids to play and do not want them to mess with his data, so the parent can mark the activity as private and the kids will not access to the data.

We are working on how to decide which data to move to the private folder and also when move them back to the original place. In this case we do not need to move .desktop files but moving files is still necessary if the file is a document created by the user.


- Lamarque Vieira


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104417/#review11909
-----------------------------------------------------------


On March 27, 2012, 2:22 p.m., Lamarque Vieira Souza wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104417/
> -----------------------------------------------------------
> 
> (Updated March 27, 2012, 2:22 p.m.)
> 
> 
> Review request for KDE Runtime and Plasma.
> 
> 
> Description
> -------
> 
> When adding an application resource to a private activity kactivitymanager tries to move the resource's .desktop file to the activity's private folder. The new .desktop file is created successfully but the source file is not deleted if the user does not have write permission on the file's directory. This patch detects such situation and uses copy instead of move to prevent "permission denied" messages for every resource being added.
> 
> 
> This addresses bug 296808.
>     http://bugs.kde.org/show_bug.cgi?id=296808
> 
> 
> Diffs
> -----
> 
>   service/jobs/nepomuk/Move.h 8a8afd1 
>   service/jobs/nepomuk/Move.cpp 08a3cc2 
> 
> Diff: http://git.reviewboard.kde.org/r/104417/diff/
> 
> 
> Testing
> -------
> 
> Works on Meego devel image. The file is copied and no error message is shown.
> 
> 
> Thanks,
> 
> Lamarque Vieira Souza
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120327/683f0be4/attachment.htm>


More information about the kde-core-devel mailing list