arkose changes ownership of user's home directory

Bug #890389 reported by Jean-Baptiste Lallement
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
arkose (Ubuntu)
Fix Released
High
Stéphane Graber
Precise
Fix Released
High
Stéphane Graber

Bug Description

On a test system there are 2 users 'j-lallement' and 'ubuntu' with the following membership
$ id j-lallement
uid=1001(j-lallement) gid=1001(j-lallement) groups=1001(j-lallement),4(adm),116(lpadmin),118(admin),124(sambashare),128(libvirtd)
$ id ubuntu
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),27(sudo),46(plugdev),116(lpadmin),118(admin),124(sambashare),128(libvirtd)

Note that ubuntu was the first account created on that box.

TEST CASE:
1. login as j-lallement
2 Start arkose with the following command
$ sudo arkose -n -h -c "cd $PWD; $SHELL"

RESULT:
The ownership of /home/j-lallement changed to ubuntu:ubuntu
# ls -l
total 16
drwx------ 173 ubuntu ubuntu 12288 Nov 14 11:47 j-lallement
drwxr-xr-x 31 ubuntu ubuntu 4096 Oct 30 03:23 ubuntu

While it should be
drwx------ 173 j-lallement j-lallement 12288 Nov 14 11:47 j-lallement
drwxr-xr-x 31 ubuntu ubuntu 4096 Oct 30 03:23 ubuntu

Expected result
The ownership shouldn't change

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: arkose 1.4-0ubuntu1
ProcVersionSignature: Ubuntu 3.1.0-2.3-generic 3.1.0
Uname: Linux 3.1.0-2-generic x86_64
ApportVersion: 1.26-0ubuntu1
Architecture: amd64
Date: Mon Nov 14 14:35:53 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: arkose
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in arkose (Ubuntu Precise):
importance: Undecided → High
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Stéphane Graber (stgraber) wrote :

Does the following diff fix it for you?

=== modified file 'arkose/__init__.py'
--- arkose/__init__.py 2011-10-29 16:41:22 +0000
+++ arkose/__init__.py 2011-11-14 21:06:28 +0000
@@ -264,9 +264,6 @@
                         os.mkdir(os.path.dirname(new_target))
                     open(new_target, 'w').close()
             self.__mount("/%s" % mount, new_target, "none", "bind")
- if os.path.isdir("/%s" % mount):
- os.chmod(new_target, 0o700)
- os.chown(new_target, 1000, 1000)

         # Setup other restricted mounts
         for mount in self.restrict:

Revision history for this message
Stéphane Graber (stgraber) wrote :

Fix pushed in revision 263 of trunk.

Please test with:
"""
bzr get lp:arkose
cd arkose
sudo cli/arkose -h -n
"""

Please note that '-c "cd $PWD; $SHELL"' is no longer necessary as it's the default now.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Yes, that fixed it. thanks

Changed in arkose (Ubuntu Precise):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package arkose - 1.4.1-0ubuntu1

---------------
arkose (1.4.1-0ubuntu1) precise; urgency=low

  * New upstream bugfix release.
    - Fix ownership of bind mounts (LP: #890389)
    - Complete overlayfs support (LP: #761447 as it likely was an aufs bug)
    - Updated translations
 -- Stephane Graber <email address hidden> Mon, 16 Jan 2012 16:26:00 -0500

Changed in arkose (Ubuntu Precise):
status: Fix Committed → Fix Released
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.