<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=5734&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] File "recently-used.xbel"]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5734</link>
		<description><![CDATA[The most recent posts in [SOLVED] File "recently-used.xbel".]]></description>
		<lastBuildDate>Sat, 03 Jun 2023 11:29:28 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42466#p42466</link>
			<description><![CDATA[<p>Excellent -&#160; Thanks a lot, guys!</p><p>And something learned again.</p>]]></description>
			<author><![CDATA[dummy@example.com (delgado)]]></author>
			<pubDate>Sat, 03 Jun 2023 11:29:28 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42466#p42466</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42459#p42459</link>
			<description><![CDATA[<div class="quotebox"><cite>steve_v wrote:</cite><blockquote><div><p>Setting the immutable bit in extended attributes should also work - chattr +i [filename] as root.</p></div></blockquote></div><p>Works perfect. Perhaps, a touch too perfect for some scenarios. But perfect to stop ALL deletions.</p><div class="codebox"><pre><code>~$ man chattr
NAME
       chattr - change file attributes on a Linux file system
…
ATTRIBUTES
…
       i      A  file  with  the &#039;i&#039; attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this
              file, most of the file&#039;s metadata can not be modified, and the file can not be opened in write mode.  Only the supe‐
              ruser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.</code></pre></div><div class="codebox"><pre><code>~$ mkdir TMP
~$ cd TMP
~/TMP$ echo &quot;a&quot; &gt; tmp.txt
~/TMP$ la tmp.txt
-rw-r--r-- 1 alexk alexk    2 Jun  3 00:04 tmp.txt
~/TMP$ sudo chown root.root tmp.txt
[sudo] password for alexk: 
~/TMP$ sudo chattr +i tmp.txt
~/TMP$ la tmp.txt
-rw-r--r-- 1 root root 2 Jun  3 00:04 tmp.txt
~/TMP$ chmod 0700 tmp.txt
chmod: changing permissions of &#039;tmp.txt&#039;: Operation not permitted
~/TMP$ sudo chmod 0700 tmp.txt
chmod: changing permissions of &#039;tmp.txt&#039;: Operation not permitted
~/TMP$ rm tmp.txt
rm: cannot remove &#039;tmp.txt&#039;: Operation not permitted
~/TMP$ sudo chattr -i tmp.txt
~/TMP$ sudo chmod 0700 tmp.txt
~/TMP$ la tmp.txt
-rwx------ 1 root root 2 Jun  3 00:04 tmp.txt
~/TMP$ rm tmp.txt
rm: remove write-protected regular file &#039;tmp.txt&#039;? y
~/TMP$ cd -
/home/alexk
~$ rmdir TMP</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (alexkemp)]]></author>
			<pubDate>Fri, 02 Jun 2023 23:18:05 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42459#p42459</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42458#p42458</link>
			<description><![CDATA[<p>Setting the immutable bit in extended attributes should also work - chattr +i [filename] as root.</p>]]></description>
			<author><![CDATA[dummy@example.com (steve_v)]]></author>
			<pubDate>Fri, 02 Jun 2023 22:45:01 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42458#p42458</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42457#p42457</link>
			<description><![CDATA[<div class="quotebox"><cite>chris2be8 wrote:</cite><blockquote><div><p>You might be able to stop this by making .local/share/ owned by root. But this would break anything else trying to create a file in .local/share/</p></div></blockquote></div><p>AppArmor is supposed to be able to limit file permissions on a per-executable basis, but first need to figure out what the offending application is.</p><p>inotifywait can be used to confirm when files are created/modified, which may help track down the cause.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Fri, 02 Jun 2023 22:22:47 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42457#p42457</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42453#p42453</link>
			<description><![CDATA[<p>I was astonished that an ordinary user can delete a file owned by root, but yes it can (if the dir is owned by the user):</p><div class="codebox"><pre><code>$ echo &quot;a&quot; &gt; tmp.txt
$ la tmp.txt
-rw-r--r-- 1 alexk alexk     2 Jun  2 17:48 tmp.txt
$ chmod 0700 tmp.txt
$ la tmp.txt
-rwx------ 1 alexk alexk 2 Jun  2 17:48 tmp.txt
$ sudo chown root.root tmp.txt
[sudo] password for alexk: 
$ la tmp.txt
-rwx------ 1 root root 2 Jun  2 17:48 tmp.txt
$ rm tmp.txt
rm: remove write-protected regular file &#039;tmp.txt&#039;? y
$ la tmp.txt
ls: cannot access &#039;tmp.txt&#039;: No such file or directory</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (alexkemp)]]></author>
			<pubDate>Fri, 02 Jun 2023 17:00:01 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42453#p42453</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42450#p42450</link>
			<description><![CDATA[<p>Thanks for the info - I was not aware of that possibilty.</p><p>At least there is nothing strange happening, as thought before.</p>]]></description>
			<author><![CDATA[dummy@example.com (delgado)]]></author>
			<pubDate>Fri, 02 Jun 2023 16:19:47 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42450#p42450</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42449#p42449</link>
			<description><![CDATA[<p>The program that re-creates it probably deletes it before re-writing the latest contents into it. If you own .local/share/ then a program, running as you can delete files from it, even if you don&#039;t own them.</p><p>You might be able to stop this by making .local/share/ owned by root. But this would break anything else trying to create a file in .local/share/</p>]]></description>
			<author><![CDATA[dummy@example.com (chris2be8)]]></author>
			<pubDate>Fri, 02 Jun 2023 16:03:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42449#p42449</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] File "recently-used.xbel"]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42448#p42448</link>
			<description><![CDATA[<p>It is a log of recently used files. There is some kind of standard form gnome / freedesktop.org. Let&#039;s say I don&#039;t want that:<br />The file is created if not existing, which is to expect. Then I recreated it read-only, and then read-only owned by root. This bloody thing always re-apperars with new content (see code-block below). Especially the last case is something I do not like at all. Meanwhile, I think it is <span class="bbc">dconf-service</span>, but not sure; <span class="bbc">apt</span> says it is neded by <span class="bbc">gtk3</span>.<br />How to tame that beast?</p><div class="codebox"><pre><code>$ cat .local/share/recently-used.xbel
&#039;recently-used.xbel&#039; is owned by root now, and contains this line.
$ ls -la .local/share/recently-used.xbel
-r--r--r-- 1 root root 67 2023-06-02 16:01 .local/share/recently-used.xbel
# 20 minutes later
$ ls -la .local/share/recently-used.xbel
-rw------- 1 tom tom 1473 2023-06-02 16:15 .local/share/recently-used.xbel</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (delgado)]]></author>
			<pubDate>Fri, 02 Jun 2023 15:05:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42448#p42448</guid>
		</item>
	</channel>
</rss>
