/tmp directory does not have permissions to allow desktop to load

Bug #1557779 reported by Frederick J. Henderson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Low
Alkis Georgopoulos

Bug Description

I recently installed Ubuntu 14.04.4 using LVM. /tmp was on its own logical volume.

I am using this computer as as LTSP server using ltsp-pnp. When the client image is built it used the permissions of /tmp prior to being mounted drwxr-xr-x (755). /tmp should have a permission of drwxrwxrwt (1777) even if it gets mounted over.

This wrong permission allowed the LTSP clients to boot but after a successful login, the client would never see the desktop but were sent back to the login screen. Changing the permissions of the client /tmp to 1777 allowed the client to login and work on the desktop.

I trying to fix this I tried a --bind mount to change the permissions of the /tmp directory. This worked to change the permissions of /tmp prior to mounting but did not change the /tmp in a newly built client image. I tried a second time booting with the Live CD. The permissions on the / (root) file system LV were correct.

I also tried booting in rescue mode and changing the permissions of the /tmp device before it was mounted to 1777 but after running ltsp-update-image once again this too failed to produce a client image with a properly permissioned /tmp.

I am reporting this here because alkisg at 03:09:58 PM in the ltsp irc channel asked me to. http://irclogs.ltsp.org/?d=2016-03-15

frederickjh: file a bug report under ltsp, I think it's an additional problem at ltsp-update-image

I have also added a comment to a ubiquity issue #371236 https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/371236

Current work around is to add the following to the [Default] section of lts.conf

# Fix permission on /tmp on the clients currently we have bug
# and they get mounted 755 instead of 1777
INIT_COMMAND_TMP="chmod 1777 /tmp"

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi Frederick, can you try if these fix the issue?
On the server:

sudo -i
sed 's,sys/\*,&|/tmp,p' -i /usr/sbin/ltsp-update-image
ltsp-update-image -c /
mount -o loop,ro /opt/ltsp/images/i386.img /mnt
ls -ld /mnt/tmp
umount /mnt

The `ls` command should tell you if it's OK after that.

Changed in ltsp:
assignee: nobody → Alkis Georgopoulos (alkisg)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Frederick J. Henderson (frederickjh) wrote :

Here is a diff of the final patch that worked.

 diff -u /tmp/ltsp-update-image /usr/sbin/ltsp-update-image
--- /tmp/ltsp-update-image 2016-03-16 08:38:51.136144438 +0100
+++ /usr/sbin/ltsp-update-image 2016-03-16 09:15:39.759706668 +0100
@@ -87,7 +87,7 @@
             *) continue ;;
         esac
         case "$point/" in
- $chroot/|/dev/*|/proc/*|/run/*|/sys/*) continue ;;
+ $chroot/|/dev/*|/proc/*|/run/*|/sys/*|/tmp/) continue ;;
             ${chroot%/}/*) echo "$point" ;;
         esac
     done < /proc/mounts | sort -u

Meld diff image here
http://s1143.photobucket.com/user/frederickjh/media/LTSP/Working_patch_diff.png.html

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :
Changed in ltsp:
status: Incomplete → Fix Committed
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Fix released in LTSP 5.5.9.

Changed in ltsp:
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.