Re: [Fedora] Re: how to automatically clean /tmp
On 01/28/16 18:46, Walter Cazzola wrote: > I still have to rid off of one of these two tmpfs > > tmpfs 1633640 0 1633640 0% /run/user/989 > tmpfs 1633640 20 1633620 1% /run/user/526 > > I think I have to keep one of them since it is associated to my id (526) > but I can't imagine what the other is for and how to avoid its creation. > Googling didn't help much. You will not want to, or be able to, get rid of those. /run is itself a tmpfs and the /run/user/$uid are created as needed by systemd, I think. This stores temporary associated with a user's running processes that only the user should have access to. Placing that info in /tmp or another area may present a security issue. /run/user/$uid is restricted to that particular UID. -- In reality, some people should stick to running Windows and others should stay away from computers altogether. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: [Fedora] Re: [Fedora] Re: how to automatically clean /tmp
On Thu, 28 Jan 2016, Jon LaBadie wrote: I still have to rid off of one of these two tmpfs tmpfs 1633640 0 1633640 0% /run/user/989 tmpfs 1633640 20 1633620 1% /run/user/526 I think I have to keep one of them since it is associated to my id (526) but I can't imagine what the other is for and how to avoid its creation. Googling didn't help much. Don't remove either one. They are managed by the system. They are taking no disk space (unless memory becomes full and it will then use swap). They are not even taking significant memory. In fact 989 is using 0 memory. Why are you so intent on removing things working as they should? Probably user 989 is your login display manager. Check who 989 is in /etc/passwd (grep 989 /etc/passwd). On my system is it "lightdm". I have a /run/user/966. My 966 is "sddm", my display manager. Indeed you are right, this is sddm, I was thinking it was something related to some other users I dismissed but it seems it is not the case. Thanks for the grep suggestion I couldn't image it was something really in use. Walter -- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: [Fedora] Re: how to automatically clean /tmp
On Thu, Jan 28, 2016 at 11:46:49AM +0100, Walter Cazzola wrote: > Ok I dropped the idea of using my current /tmp partition for a tmpfs and > followed your suggestion > > On Wed, 27 Jan 2016, Gordon Messmer wrote: > > >If you'd like to use tmpfs now, you can "systemctl enable tmp.mount" and > >comment out the /tmp item you currently have in fstab. When you reboot, > >you should have /tmp mounted as tmpfs. > > unfortunately this didn't work > >> systemctl enable tmp.mount >The unit files have no [Install] section. They are not meant to be enabled >using systemctl. >Possible reasons for having this kind of units are: >1) A unit may be statically enabled by being symlinked from another unit's > .wants/ or .requires/ directory. >2) A unit's purpose may be to act as a helper for some other unit which has > a requirement dependency on it. >3) A unit may be started when needed via activation (socket, path, timer, > D-Bus, udev, scripted systemctl call, ...). > > But I've solved it by manually adding >tmpfs /tmp tmpfs rw,seclabel 0 0 > to /etc/fstab and commenting the line used to mount the old /tmp > partition. > > I still have to rid off of one of these two tmpfs > > tmpfs 1633640 0 1633640 0% /run/user/989 > tmpfs 1633640 20 1633620 1% /run/user/526 > > I think I have to keep one of them since it is associated to my id (526) > but I can't imagine what the other is for and how to avoid its creation. > Googling didn't help much. > Don't remove either one. They are managed by the system. They are taking no disk space (unless memory becomes full and it will then use swap). They are not even taking significant memory. In fact 989 is using 0 memory. Why are you so intent on removing things working as they should? Probably user 989 is your login display manager. Check who 989 is in /etc/passwd (grep 989 /etc/passwd). On my system is it "lightdm". I have a /run/user/966. My 966 is "sddm", my display manager. jl -- Jon H. LaBadie jo...@jgcomp.com -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: [Fedora] Re: how to automatically clean /tmp
Ok I dropped the idea of using my current /tmp partition for a tmpfs and followed your suggestion On Wed, 27 Jan 2016, Gordon Messmer wrote: If you'd like to use tmpfs now, you can "systemctl enable tmp.mount" and comment out the /tmp item you currently have in fstab. When you reboot, you should have /tmp mounted as tmpfs. unfortunately this didn't work > systemctl enable tmp.mount The unit files have no [Install] section. They are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). But I've solved it by manually adding tmpfs /tmp tmpfs rw,seclabel 0 0 to /etc/fstab and commenting the line used to mount the old /tmp partition. I still have to rid off of one of these two tmpfs tmpfs 1633640 0 1633640 0% /run/user/989 tmpfs 1633640 20 1633620 1% /run/user/526 I think I have to keep one of them since it is associated to my id (526) but I can't imagine what the other is for and how to avoid its creation. Googling didn't help much. Thanks Walter -- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: [Fedora] Re: how to automatically clean /tmp
On 01/28/2016 02:46 AM, Walter Cazzola wrote: On Wed, 27 Jan 2016, Gordon Messmer wrote: If you'd like to use tmpfs now, you can "systemctl enable tmp.mount" and comment out the /tmp item you currently have in fstab. unfortunately this didn't work > systemctl enable tmp.mount The unit files have no [Install] section. They are not meant to be enabled using systemctl. That's weird... # tail -3 /usr/lib/systemd/system/tmp.mount # Make 'systemctl enable tmp.mount' work: [Install] WantedBy=local-fs.target But I've solved it by manually adding tmpfs /tmp tmpfs rw,seclabel 0 0 to /etc/fstab and commenting the line used to mount the old /tmp partition. Obviously that works, but it'll be mounted later in the boot process. Thinking about it... it's possible that /tmp on tmpfs is actually mounted by default, without needing to "enable" it specifically, and that the only requirement is that you don't specify any other filesystem for /tmp in fstab. If you're curious, try it. Comment out /tmp in fstab and see what you get when you reboot. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: [Fedora] Re: [Fedora] Re: how to automatically clean /tmp
On 28 January 2016 at 16:19, Walter Cazzolawrote: > > On Thu, 28 Jan 2016, Jon LaBadie wrote: > >>> I still have to rid off of one of these two tmpfs > > >>> tmpfs 1633640 0 1633640 0% /run/user/989 >>> tmpfs 1633640 20 1633620 1% /run/user/526 > > >>> I think I have to keep one of them since it is associated to my id (526) >>> but I can't imagine what the other is for and how to avoid its creation. >>> Googling didn't help much. > > >> Don't remove either one. They are managed by the system. >> They are taking no disk space (unless memory becomes full >> and it will then use swap). They are not even taking >> significant memory. In fact 989 is using 0 memory. >> Why are you so intent on removing things working as >> they should? > > >> Probably user 989 is your login display manager. >> Check who 989 is in /etc/passwd (grep 989 /etc/passwd). >> On my system is it "lightdm". I have a /run/user/966. >> My 966 is "sddm", my display manager. > > > Indeed you are right, this is sddm, I was thinking it was something > related to some other users I dismissed but it seems it is not the case. > > Thanks for the grep suggestion I couldn't image it was something really > in use. > > Incidentally whilst you're in the middle of cleaning up the system you really should move your UID to something over 1000 ... There's a lot of stuff that no longer works as expected with a UID around 500 (have you checked you login.defs recently)? Seeing a display manager with a UID higher than your own ought to be a warning sign ;) -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: how to automatically clean /tmp
On Wed, 2016-01-27 at 15:06 -0500, Jon LaBadie wrote: > I don't think you can reserve a partition for the use of a tmpfs. You don't. You mount a tmpfs on top of a directory. Once mounted, any attempt to access that directory goes into the temporary file system that you mounted there. Any files that were in the directory become inaccessible. > > If you want to use your partition as /tmp but have it cleaned out at > boot, check the manpage for tmpfiles.d There are some advantages to persistent /tmp files (such as if debugging information stays in there until you've used it). The old idea, when it worked, was to leave files in there and delete them a few days after they were created, or a few days since they were last read (using a cron job, to automate that). Though waiting for a few days of them not being read could last forever, in some cases. You only have to open the /tmp directory in a file browser, and the filebrowser will look into each file to see what they are, and that means that they've been "read". Likewise for anything else that scans the directory tree, and goes through /tmp. -- tim@localhost ~]$ uname -rsvp Linux 3.19.8-100.fc20.i686 #1 SMP Tue May 12 17:42:35 UTC 2015 i686 All mail to my mailbox is automatically deleted, there is no point trying to privately email me, I will only read messages posted to the public lists. George Orwell's '1984' was supposed to be a warning against tyranny, not a set of instructions for supposedly democratic governments. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: how to automatically clean /tmp
On Wed, Jan 27, 2016 at 08:29:57PM +0100, Walter Cazzola wrote: > Dear Linux Experts, > > I've recently passed from Fedora 20 to Fedora 23 on my laptop. > > I've a separate partition for /tmp that I'm used to see it wiped out at > any reboot on my previous installation but now this is never wiped out. > > This is a real partition: > > /dev/sda10 5029504 1154204 3596772 25% /tmp > > whereas previously it was a tmpfs partition. I've read on the web that > after Fedora 20 the tmpfs has been dropped in favor of real partition > but I was expecting anacron/cron entry that wipe the content of the > partition at boot but my system doesn't have any. > > It is also difficult to create my own anacron/cron entry because this > should take effect before the system starts and create its temp > files/sockets in there. > > I'm also puzzled because I also have a couple of tmpfs partitions: > > tmpfs1633640 0 1633640 0% /run/user/989 > tmpfs163364016 1633624 1% /run/user/526 > > that I don't what they are for and if I can (and how) rid of them. > > Probably I could add an entry like this > tmpfs /tmptmpfs rw,seclabel 0 0 > > in /etc/fstab but this would means a waste of the space I currently have > reserved for /tmp (4Gb not much but I would prefer to use them). > > So there is a way to wipe out the /tmp partition before it has been > mounted and the system creates its files and use the current partition > for it? Couple of points. I don't think you can reserve a partition for the use of a tmpfs. It uses your RAM memory and swap space instead. You could add /dev/sda10 as another swap partition. Then perhaps add the fstab entry. However, I think systemd has a way mount /tmp as a tmpfs without having an fstab entry. If you want to use your partition as /tmp but have it cleaned out at boot, check the manpage for tmpfiles.d Jon -- Jon H. LaBadie jo...@jgcomp.com -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: how to automatically clean /tmp
On 01/27/2016 11:29 AM, Walter Cazzola wrote: I've a separate partition for /tmp that I'm used to see it wiped out at any reboot on my previous installation but now this is never wiped out. That's the expected behavior. If you specify a partition during install, it will be used. If you use the default layout, you'll get tmp on tmpfs. There's no active wiping involved, either way. tmpfs simply isn't persistent. If you'd like to use tmpfs now, you can "systemctl enable tmp.mount" and comment out the /tmp item you currently have in fstab. When you reboot, you should have /tmp mounted as tmpfs. Once you've done that, you can remove the partition or LV that you're using for /tmp now. Then you can resize another LV to use the free space or, if you're not using LVM, try to figure out how to do something useful with the space. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org