incorrect PARENT_DIR setting results in prompt for root access

Bug #1288448 reported by Jamin W. Collins
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nautilus-dropbox (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Recently, I received a prompt indicating that dropbox needed super user permissions. I found this strange as dropbox should only need access to folders and files owned by my user. A quick google search turned up the following:

http://blog.ishans.info/2013/12/26/fixing-authentication-is-needed-to-run-usrbindropbox-as-the-super-user-error-in-linux/

The referenced fix:

diff --git a/dropbox b/dropbox
index e4f2bfc..c087b71 100755
--- a/dropbox
+++ b/dropbox
@@ -54,7 +54,7 @@ GPG_WARNING = u"Note: python-gpgme is not installed, we will n
 DOWNLOADING = u"Downloading Dropbox... %d%%"
 UNPACKING = u"Unpacking Dropbox... %d%%"

-PARENT_DIR = os.path.expanduser("/var/lib/dropbox")
+PARENT_DIR = os.path.expanduser("~")
 DROPBOXD_PATH = "%s/.dropbox-dist/dropboxd" % PARENT_DIR
 DESKTOP_FILE = u"/usr/share/applications/dropbox.desktop"

 does indeed appear to work.

----------------------------------------------------------------------------------
WORKAROUND:

Purge then reinstall nautilus-dropbox;

sudo apt-get purge nautilus-dropbox && sudo apt-get install nautilus-dropbox
----------------------------------------------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: nautilus-dropbox 1.4.0-3ubuntu0.13.10.1 [modified: usr/bin/dropbox]
Uname: Linux 3.13.5-ar-dc0ead5 x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Wed Mar 5 14:39:54 2014
InstallationDate: Installed on 2009-12-21 (1535 days ago)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MarkForUpload: True
SourcePackage: nautilus-dropbox
UpgradeStatus: Upgraded to saucy on 2013-11-04 (121 days ago)

Revision history for this message
Jamin W. Collins (jcollins) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Correct PARENT_DIR variable" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 1288448] [NEW] incorrect PARENT_DIR setting results in prompt for root access

On Wed, Mar 05, 2014 at 10:48:30PM -0000, Jamin W. Collins wrote:
> Public bug reported:
>
> Recently, I received a prompt indicating that dropbox needed super user
> permissions. I found this strange as dropbox should only need access to
> folders and files owned by my user. A quick google search turned up the
> following:
>
> http://blog.ishans.info/2013/12/26/fixing-authentication-is-needed-to-
> run-usrbindropbox-as-the-super-user-error-in-linux/
>
> The referenced fix:
>
> diff --git a/dropbox b/dropbox
> index e4f2bfc..c087b71 100755
> --- a/dropbox
> +++ b/dropbox
> @@ -54,7 +54,7 @@ GPG_WARNING = u"Note: python-gpgme is not installed, we will n
> DOWNLOADING = u"Downloading Dropbox... %d%%"
> UNPACKING = u"Unpacking Dropbox... %d%%"
>
> -PARENT_DIR = os.path.expanduser("/var/lib/dropbox")
> +PARENT_DIR = os.path.expanduser("~")
> DROPBOXD_PATH = "%s/.dropbox-dist/dropboxd" % PARENT_DIR
> DESKTOP_FILE = u"/usr/share/applications/dropbox.desktop"
>
> does indeed appear to work.

By default, we use /var/lib/dropbox/.dropbox-dist/dropboxd, which is the
systemwide installation of dropbox that is automatically downlodaded/upgraded as
you upgrade your nautilus-dropbox package via apt, so PARENT_DIR is as intended.
By moving it to $HOME/.dropbox-dist instead, you're switching it to using your
per-user dropbox instance which resides in your home directory.

The problem here is that dropbox, as launched by the user, appears to want to
update dropbox of its own accord, whereas /var/lib/dropbox/.dropbox-dist is only
upgraded when the actual nautilus-dropbox package is upgraded.

My guess is that this only happens when upstream dropbox wants you to update
your dropbox verison and the nautilus-dropbox package you have installed does
not upgrade itself due to being frozen as a part of a stable Ubuntu release.

A simple workaround without patching would be to reinstall the nautilus-dropbox
package.

I'm leaving this bug as new because I'm still considering what the best course
of action would be:
 - to drop our Debian patch that makes dropbox use a systemwide
   /var/lib/dropbox/.dropbox-dist installation; or

 - to find some way to disable dropbox from attempting to automatically
   upgrade itself.

--
Kind regards,
Loong Jin

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus-dropbox (Ubuntu):
status: New → Confirmed
tags: added: trusty
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

It renders essential features or functionality of the package (or a dependent one) broken.

Changed in nautilus-dropbox (Ubuntu):
importance: Undecided → High
Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 1288448] Re: incorrect PARENT_DIR setting results in prompt for root access

On Sat, Mar 08, 2014 at 06:33:50PM -0000, Alberto Salvia Novella wrote:
> It renders essential features or functionality of the package (or a
> dependent one) broken.

I don't consider dropbox's auto-updating feature to be an essential feature.

  importance medium

--
Kind regards,
Loong Jin

Changed in nautilus-dropbox (Ubuntu):
importance: High → Medium
tags: added: precise
description: updated
description: updated
Revision history for this message
Jamin W. Collins (jcollins) wrote :

It doesn't just disable the auto updating feature, it also disables the user level synchronization unless the user grants it privileges to run as root. At least that's the behavior I witnessed.

Revision history for this message
Nicolas Soprano (nsoprano) wrote :

Hi! I really have a great day every time when I read awesome essay works at the best and the most pro online https://www.personalstatementwriter.com/ writing company, where you can buy essays online. It is very informative and you have the power to persuade your readers. I hope they will always update their projects, so we can see what is the latest interesting news they can share with us at all.

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.