<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=4254&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] crontab permission problem]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=4254</link>
		<description><![CDATA[The most recent posts in [SOLVED] crontab permission problem.]]></description>
		<lastBuildDate>Sat, 10 Apr 2021 11:16:48 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] crontab permission problem]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29001#p29001</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Yes ...</p></div></blockquote></div><p>Right.<br />Further thinking about it, I see it makes sense.</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>But I would just use the <span class="bbc">size</span> option described in logrotate(8) to control how big the files get before being rotated.</p></div></blockquote></div><p>I recall (?) thinking about that but did not see the need for the rotated files.<br />I&#039;ll look into that, thanks for the heads up.</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... would delete ~/.xsession-errors at the start of every X session ...<br />... doesn&#039;t seem much point keeping error logs from old sessions.</p></div></blockquote></div><p>Yes, I have seen that done.<br />And taking into account how unintelligible they are ...</p><p>But I have found that they have been a sort of reference for comparison purposes between boots.<br />Not that I actually solved anything.&#160; 8^7</p><p>Thanks a lot for your input.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 10 Apr 2021 11:16:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29001#p29001</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] crontab permission problem]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29000#p29000</link>
			<description><![CDATA[<p>Yes, I think so.</p><p>But I would just use the <span class="bbc">size</span> option described in logrotate(8) to control how big the files get before being rotated.</p><p>EDIT: and I would delete ~/.xsession-errors at the start of every X session because there doesn&#039;t seem much point keeping error logs from old sessions.</p><p>To wit:</p><div class="codebox"><pre><code>echo &#039;rm ~/.xsession-errors&#039; &gt;&gt; ~/.xsessionrc</code></pre></div><p>See also <a href="https://wiki.debian.org/Xsession" rel="nofollow">https://wiki.debian.org/Xsession</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 10 Apr 2021 10:54:45 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29000#p29000</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] crontab permission problem]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28999#p28999</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... indicate that root can read or write to the files but members of the adm group can only read them.</p></div></blockquote></div><p>I see.<br />Crontab runs as the user that added the scripts so my only options are:</p><p>1. to put the lines needing <span class="bbc">root</span> credentials in <span class="bbc">/etc/cron.d</span>.<br />2. add them to via sudo crontab-e to root&#039;s crontab.</p><p>Is this so?</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 10 Apr 2021 10:39:41 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28999#p28999</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] crontab permission problem]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28997#p28997</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><div class="codebox"><pre><code>-rw-r----- 1 root        adm    6639408 Apr  9 17:20 boot
[...]
-rw-r----- 1 root        adm     105594 Apr  9 18:35 cron.log
-rw-r----- 1 root        adm   14428210 Apr  4 06:50 cron.log.1</code></pre></div></div></blockquote></div><p>Those permissions indicate that root can read or write to the files but members of the adm group can only read them.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 10 Apr 2021 10:03:47 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28997#p28997</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] crontab permission problem]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=28989#p28989</link>
			<description><![CDATA[<p>Hello:</p><p>Now that my <span class="bbc">cron</span> issues were taken care of, I now see the errors that crop up when it actually runs as intended.&#160; 8^7</p><p>My <span class="bbc">crontab</span> has these three entries with the purpose of keeping log files to a manageable size till the time they get rotated:</p><div class="codebox"><pre><code># 1. For /home/groucho/.xsession-errors
# ---
0 */23 * * *  [ $(du -k .xsession-errors | awk &#039;{ print $1 }&#039;) -gt 5000 ] &amp;&amp; tail -200 /home/$(whoami)/.xsession-errors &gt; /home/$(whoami$
# ---
#
# 2. For /var/log/boot (bootlogd)
# ---
0 */23 * * *  [ $(du -k /var/log/boot | awk &#039;{ print $1 }&#039;) -gt 5000 ] &amp;&amp; tail -200 /var/log/boot &gt; /var/log/boot
# ---

# 3. For /var/log/cron.log
# ---
0 */23 * * *  [ $(du -k /var/log/cron.log | awk &#039;{ print $1 }&#039;) -gt 5000 ] &amp;&amp; tail -200 /var/log/cron.log &gt; /var/log/cron.log
# ---</code></pre></div><p>The first one has no issues, it is for the prolific <span class="bbc">.xsession-errors</span> living at <span class="bbc">/home</span>.</p><p>But the other two need <span class="bbc">admin</span> rights:</p><div class="codebox"><pre><code>groucho@devuan:~$ tail -200 /var/log/boot &gt; /var/log/boot
bash: /var/log/boot: Permission denied
groucho@devuan:~$ </code></pre></div><div class="codebox"><pre><code>groucho@devuan:~$ tail -200 /var/log/cron.log &gt; /var/log/cron.log
bash: /var/log/cron.log: Permission denied
groucho@devuan:~$ </code></pre></div><p>My user belongs to a miriad of groups:</p><div class="codebox"><pre><code>groucho@devuan:~$ groups
groucho adm lp mail dialout fax cdrom floppy tape sudo audio dip www-data backup video plugdev staff users crontab netdev lpadmin scanner saned fuse powerdev debian-exim
groucho@devuan:~$ </code></pre></div><p>As you can see, <span class="bbc">adm</span> is one of them.<br />But doesn&#039;t <span class="bbc">adm</span> have rights over /var/log/boot and /var/log/cron.log?</p><div class="codebox"><pre><code>groucho@devuan:~$ 
groucho@devuan:~$ ls -l /var/log | grep adm |grep boot
-rw-r----- 1 root        adm    6639408 Apr  9 17:20 boot
groucho@devuan:~$ </code></pre></div><div class="codebox"><pre><code>groucho@devuan:~$ 
groucho@devuan:~$ ls -l /var/log | grep adm |grep cron.log
-rw-r----- 1 root        adm     105594 Apr  9 18:35 cron.log
-rw-r----- 1 root        adm   14428210 Apr  4 06:50 cron.log.1
groucho@devuan:~$ </code></pre></div><p>What am I missing?</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 09 Apr 2021 21:48:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=28989#p28989</guid>
		</item>
	</channel>
</rss>
