Announcement

Collapse
No announcement yet.

Once again... Xsession warning Unable to write to /tmp

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Once again... Xsession warning Unable to write to /tmp

    I thought nightly full shutdowns (last step: AC switched off) would prevent this from recurring (it was just a few months ago that I asked for help about it), but apparently not. After being unable to fix the problem running 16.04 from a thumb drive, I reinstalled (again).
    How can I keep this from happening again? Is flushing /tmp at shutdown optional, or does it require changes in ownerships/permissions?
    Sorry to be dense on this, guys. I've done forum/Google searches and found several threads dating back about 15 years, but have been unable to apply what I've found.
    -- Werdigo49
    Registered Linux User #291592
    Kubuntu Xenial Xerus (16.04)

    #2
    1. Are the permissions/ownerships of /tmp correct, what is the output of:
    Code:
    [FONT=monospace]ls -lad /tmp[/FONT]
    2. Is there free space on the filesystem that contains /tmp, what is the output of:
    Code:
    [FONT=monospace]df -h /tmp[/FONT]
    Last edited by kubicle; Jan 31, 2019, 10:56 AM.

    Comment


      #3
      Thank you, kibicle. Here are the two outputs you requested:

      john@john-Shack:~$ ls -lad /tmp
      drwxrwxrwt 18 root root 4096 Jan 31 12:39 /tmp
      john@john-Shack:~$

      john@john-Shack:~$ df -h /tmp
      Filesystem Size Used Avail Use% Mounted on
      /dev/sdb2 23G 6.0G 16G 29% /
      john@john-Shack:~$
      -- Werdigo49
      Registered Linux User #291592
      Kubuntu Xenial Xerus (16.04)

      Comment


        #4
        Correct me if I'm wrong, but doesn't X launch as USER not ROOT?

        So werdigo49, have you created a ROOT user password and/or tried launching X as root (like with sudo)? Do;

        ll /tmp

        and look for xauth-1000-0 and make sure it's owned by you. There shouldn't be any other xauth in there.

        As a sanity check, you could log out and wipe /tmp from the terminal.

        Please Read Me

        Comment


          #5
          BTW, since this has happened to you before, I'm suspicious that it's being caused by something you're doing. Whatever it might be, you might consider mounting tmpfs in memory as I suggested last time. At least you know it's clean at every boot.

          Please Read Me

          Comment


            #6
            Originally posted by werdigo49 View Post
            Thank you, kibicle. Here are the two outputs you requested:

            john@john-Shack:~$ ls -lad /tmp
            drwxrwxrwt 18 root root 4096 Jan 31 12:39 /tmp
            john@john-Shack:~$

            john@john-Shack:~$ df -h /tmp
            Filesystem Size Used Avail Use% Mounted on
            /dev/sdb2 23G 6.0G 16G 29% /
            john@john-Shack:~$
            These look all good, so those are not at fault here

            Originally posted by oshunluvr View Post
            Correct me if I'm wrong, but doesn't X launch as USER not ROOT?
            The X window system (Xorg) runs as root, individual user sessions run as $USER (startkde)

            Originally posted by oshunluvr View Post
            ll /tmp

            As a sanity check, you could log out and wipe /tmp from the terminal.
            Originally posted by oshunluvr View Post
            BTW, since this has happened to you before, I'm suspicious that it's being caused by something you're doing. Whatever it might be, you might consider mounting tmpfs in memory as I suggested last time. At least you know it's clean at every boot.
            These sound like solid steps to troubleshoot further

            Comment


              #7
              Thanks. I'll keep after it --- there must be a reason.
              Last edited by werdigo49; Feb 03, 2019, 08:21 AM.
              -- Werdigo49
              Registered Linux User #291592
              Kubuntu Xenial Xerus (16.04)

              Comment


                #8
                Originally posted by oshunluvr View Post
                As a sanity check, you could log out and wipe /tmp from the terminal.
                How do I do this? Use rm?
                -- Werdigo49
                Registered Linux User #291592
                Kubuntu Xenial Xerus (16.04)

                Comment


                  #9
                  The "t" permission for directories like /tmp means that even though any user can write to /tmp, only the owner may remove files or directories. There may be some directory that is owned by root but is attempting to be modified by a non-privileged user.

                  The nature of the contents of /tmp is that it is temporary. Clearing up may get past the current issue but does not address the real problem. Perhaps, some X process is running as root and depositing files to /tmp.

                  Comment


                    #10
                    Originally posted by andystmartin View Post
                    The "t" permission for directories like /tmp means that even though any user can write to /tmp, only the owner may remove files or directories. There may be some directory that is owned by root but is attempting to be modified by a non-privileged user.

                    The nature of the contents of /tmp is that it is temporary. Clearing up may get past the current issue but does not address the real problem. Perhaps, some X process is running as root and depositing files to /tmp.
                    Thanks, Andy.

                    I use KSysGuard to show which processes are running. Many of them show "Username" as my username, but many others (including Xorg) show Username as "root."
                    That looks like an "X process [that] is running as root..."! Does it suggest a potential problem? Or is this normal?
                    -- Werdigo49
                    Registered Linux User #291592
                    Kubuntu Xenial Xerus (16.04)

                    Comment


                      #11
                      Xorg runs as root, kwin_x11 runs as user

                      Please Read Me

                      Comment


                        #12
                        Originally posted by werdigo49
                        ...
                        After being unable to fix the problem running 16.04 from a thumb drive, I reinstalled (again).
                        ...
                        This could be interpreted a couple of ways. Do you mean you reinstalled _on a thumb drive_?

                        How?

                        Bootable live ISO, or bootable full system?

                        If the only problem is writing to /tmp, one thing you might try is mounting /tmp as a tmpfs. This would be applicable if you have installed the full system to the thumb drive. In /etc/fstab, add a line like this:

                        Code:
                        tmpfs                            /tmp           tmpfs   defaults,noatime,mode=1777  0  0

                        Comment

                        Working...
                        X