<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cleanwork Deployment on UNIX SAS in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281035#M5346</link>
    <description>&lt;P&gt;Do you have suggestions as to what user i should run the cleanwork script with?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it as root is not allowed by our IT department since the cleanwork script is owned by&amp;nbsp;the sas installation user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it as the sas installation user (sasinst) does not work since that account does not have sufficient permissions on the work directories to delete them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting workperms to 2775 and saswork directory group to&amp;nbsp;sasinst does not work&amp;nbsp;because if the user is not a member of the sasinst group, the files and subdirectories beneath the created SAS_worknnnn directory are created with 775 (instead of 2775) and that prevents sasinst group members from deleting the files in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it&amp;nbsp;under the users' account is possible but then i need a crontab entry for every single user, which is quite cumbersome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know your thoughts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2016 11:38:53 GMT</pubDate>
    <dc:creator>bheinsius</dc:creator>
    <dc:date>2016-06-29T11:38:53Z</dc:date>
    <item>
      <title>Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268401#M4918</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am looking for the best/effective way to deploy Cleanwork in a UNIX SAS environment.&lt;/P&gt;
&lt;P&gt;Here are some of the things that i am looking for:&lt;/P&gt;
&lt;P&gt;1. Log deletion activity&lt;/P&gt;
&lt;P&gt;2. Dont let the log grow indefinitely&lt;/P&gt;
&lt;P&gt;3. Email support teams with status of Cleanwork&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working to create a small wrapper around cleanwork to have it email the daily cleanup status,&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 23:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268401#M4918</guid>
      <dc:creator>rsc24_in</dc:creator>
      <dc:date>2016-05-04T23:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268404#M4919</link>
      <description>&lt;P&gt;So what's your question? Sorry, it's not clear what exactly you need help with.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 23:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268404#M4919</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-04T23:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268406#M4920</link>
      <description>I am looking for some best practices while deploying cleanwork. Like say log management or other considerations when deploying cleanwork.</description>
      <pubDate>Thu, 05 May 2016 00:24:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268406#M4920</guid>
      <dc:creator>rsc24_in</dc:creator>
      <dc:date>2016-05-05T00:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268407#M4921</link>
      <description>&lt;P&gt;The CLEANWORK utility is not about log management. It is used to remove leftover SAS WORK directories:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hostunx/67929/HTML/default/viewer.htm#n13ozwpq7az8v6n1s77r8c2zp9d1.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostunx/67929/HTML/default/viewer.htm#n13ozwpq7az8v6n1s77r8c2zp9d1.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best practice is to run this as a daily scheduled task at a time when there unlikely to be any SAS jobs running - say midnight for example. If it fails for some reason then some WORK space may taken by the old WORK directories. This is not usually a big deal for a day or two, but if left could cause you to run out of WORK space. Hence the &lt;SPAN&gt;daily scheduled task should be monitored to ensure it runs successfully on most days.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 00:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/268407#M4921</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-05-05T00:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281035#M5346</link>
      <description>&lt;P&gt;Do you have suggestions as to what user i should run the cleanwork script with?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it as root is not allowed by our IT department since the cleanwork script is owned by&amp;nbsp;the sas installation user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it as the sas installation user (sasinst) does not work since that account does not have sufficient permissions on the work directories to delete them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting workperms to 2775 and saswork directory group to&amp;nbsp;sasinst does not work&amp;nbsp;because if the user is not a member of the sasinst group, the files and subdirectories beneath the created SAS_worknnnn directory are created with 775 (instead of 2775) and that prevents sasinst group members from deleting the files in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running it&amp;nbsp;under the users' account is possible but then i need a crontab entry for every single user, which is quite cumbersome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know your thoughts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 11:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281035#M5346</guid>
      <dc:creator>bheinsius</dc:creator>
      <dc:date>2016-06-29T11:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281039#M5347</link>
      <description>&lt;P&gt;Hi Bart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what about to give sasinst user some sudo permissions for W on the SASWork&amp;nbsp;folder? Or any other system account other than root.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should do the trick.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Juan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 11:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281039#M5347</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2016-06-29T11:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281040#M5348</link>
      <description>&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain what you mean by: "&lt;SPAN&gt;give sasinst user some sudo permissions for W on the SASWork&amp;nbsp;folder" ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 11:54:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281040#M5348</guid>
      <dc:creator>bheinsius</dc:creator>
      <dc:date>2016-06-29T11:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281041#M5349</link>
      <description>&lt;P&gt;I mean that the system administrators can give part permissions to execute some commands and access some locations as a root.&lt;/P&gt;
&lt;P&gt;This functionality is named " sudo" :&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Sudo" target="_blank"&gt;https://en.wikipedia.org/wiki/Sudo&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The trick is to specify carefully what you need as a root, then the security team will evaluate and accept your request, or reject it.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 11:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281041#M5349</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2016-06-29T11:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281112#M5350</link>
      <description>&lt;P&gt;yes but then the script runs as root which is what IT&amp;nbsp;does not want. unless the script&amp;nbsp;cannot be modified by sasinst by changing owner to root.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so that is an option.&lt;/P&gt;&lt;P&gt;any other ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281112#M5350</guid>
      <dc:creator>bheinsius</dc:creator>
      <dc:date>2016-06-29T14:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281113#M5351</link>
      <description>&lt;P&gt;Hi Bart,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand your reasoning process, but I think you are wrong. Sudo can be configured on many ways... and it should not be configured on a way that sasinst will "run as" &amp;nbsp;root. The script will run as sasinst. But sasinst will have a &lt;STRONG&gt;&lt;U&gt;subset&lt;/U&gt;&lt;/STRONG&gt; of root privileges.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The link to the wikipedia I sent you earlier explains it very well and shortly:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;H2&gt;&lt;SPAN class="mw-headline"&gt;Design&lt;/SPAN&gt;&lt;SPAN class="mw-editsection"&gt;&lt;SPAN class="mw-editsection-bracket"&gt;[&lt;/SPAN&gt;&lt;A title="Edit section: Design" href="https://en.wikipedia.org/w/index.php?title=Sudo&amp;amp;action=edit&amp;amp;section=2" target="_blank"&gt;edit&lt;/A&gt;&lt;SPAN class="mw-editsection-bracket"&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;Unlike the command &lt;I&gt;su&lt;/I&gt;, users supply their personal password to sudo if necessary. After authentication, and if the configuration file permits the user access, the system invokes the requested command. By default the user's password can be retained through a grace period (15 minutes per &lt;A class="mw-redirect" title="Pseudo terminal" href="https://en.wikipedia.org/wiki/Pseudo_terminal" target="_blank"&gt;pseudo terminal&lt;/A&gt;), allowing the user to execute several successive commands as the requested user without having to provide a password again.&lt;/P&gt;
&lt;P&gt;sudo may be configured to log each command run. When a user attempts to invoke sudo without being listed in the configuration file, an exception indication is presented to the user indicating that the attempt has been recorded. The root user will be alerted via mail and an entry is recorded in the &lt;A class="mw-redirect" title="System log" href="https://en.wikipedia.org/wiki/System_log" target="_blank"&gt;system log&lt;/A&gt;.&lt;SUP id="cite_ref-12" class="reference"&gt;&lt;A href="https://en.wikipedia.org/wiki/Sudo#cite_note-12" target="_blank"&gt;[12]&lt;/A&gt;&lt;/SUP&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class="mw-headline"&gt;Configuration&lt;/SPAN&gt;&lt;SPAN class="mw-editsection"&gt;&lt;SPAN class="mw-editsection-bracket"&gt;[&lt;/SPAN&gt;&lt;A title="Edit section: Configuration" href="https://en.wikipedia.org/w/index.php?title=Sudo&amp;amp;action=edit&amp;amp;section=3" target="_blank"&gt;edit&lt;/A&gt;&lt;SPAN class="mw-editsection-bracket"&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;The file /etc/sudoers may contain a list of users to &lt;A class="mw-redirect" title="Execution (computers)" href="https://en.wikipedia.org/wiki/Execution_(computers)" target="_blank"&gt;execute&lt;/A&gt; a &lt;A title="Subset" href="https://en.wikipedia.org/wiki/Subset" target="_blank"&gt;subset&lt;/A&gt; of commands while having the privileges of the &lt;A class="mw-redirect" title="Root user" href="https://en.wikipedia.org/wiki/Root_user" target="_blank"&gt;root user&lt;/A&gt; or other specified user. The program may be configured to require a password or none at all.&lt;SUP id="cite_ref-grati6_13-0" class="reference"&gt;&lt;A href="https://en.wikipedia.org/wiki/Sudo#cite_note-grati6-13" target="_blank"&gt;[13]&lt;/A&gt;&lt;/SUP&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class="mw-headline"&gt;Impact&lt;/SPAN&gt;&lt;SPAN class="mw-editsection"&gt;&lt;SPAN class="mw-editsection-bracket"&gt;[&lt;/SPAN&gt;&lt;A title="Edit section: Impact" href="https://en.wikipedia.org/w/index.php?title=Sudo&amp;amp;action=edit&amp;amp;section=4" target="_blank"&gt;edit&lt;/A&gt;&lt;SPAN class="mw-editsection-bracket"&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;In some system distributions, sudo has largely supplanted the default use of a distinct superuser login for administrative tasks, most notably in some &lt;A title="Linux distribution" href="https://en.wikipedia.org/wiki/Linux_distribution" target="_blank"&gt;Linux distributions&lt;/A&gt; as well as Apple's &lt;A class="mw-redirect" title="Mac OS X" href="https://en.wikipedia.org/wiki/Mac_OS_X" target="_blank"&gt;Mac OS X&lt;/A&gt;.&lt;SUP id="cite_ref-ubunt5_14-0" class="reference"&gt;&lt;A href="https://en.wikipedia.org/wiki/Sudo#cite_note-ubunt5-14" target="_blank"&gt;[14]&lt;/A&gt;&lt;/SUP&gt;&lt;SUP id="cite_ref-macdv4_15-0" class="reference"&gt;&lt;A href="https://en.wikipedia.org/wiki/Sudo#cite_note-macdv4-15" target="_blank"&gt;[15]&lt;/A&gt;&lt;/SUP&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281113#M5351</guid>
      <dc:creator>JuanS_OCS</dc:creator>
      <dc:date>2016-06-29T14:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281138#M5352</link>
      <description>&lt;P&gt;Brat,&lt;/P&gt;
&lt;P&gt;I believe we had the exact same situation at our site.&lt;/P&gt;
&lt;P&gt;The solution was:&lt;/P&gt;
&lt;P&gt;1. Create a new directory owned and managed by root. (the entire path must be root owned/managed)&lt;/P&gt;
&lt;P&gt;2. Copy the cleanwork utility from SAS Utilities location to this new directory and change permissions to have root own this file.&lt;/P&gt;
&lt;P&gt;3. Create a wrapper for cleanwork (if needed) and enable logging, as required. Change permissions to have root own this file.&lt;/P&gt;
&lt;P&gt;4. Schedule the script as root to run weekly/daily.&lt;/P&gt;
&lt;P&gt;This setup isolates cleanwork from the installer account and only root will have access to modify/update the script or the cron entry.&lt;/P&gt;
&lt;P&gt;Now, if the IT department is not familiar with cleanwork, they would question what the utility does and if it can adversely impact the&amp;nbsp;system. You might have some convincing&amp;nbsp;to do here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample of the wrapper that we created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;#!/bin/bash

dt=$(date +%Y%m%d-%H_%M_%S)

/opt/local/sas-admin/cleanwork /opt/local/saswork &amp;gt;&amp;gt; /opt/local/sas/shared/cleanwrk/cleanwrk.log 2&amp;gt;&amp;amp;1

echo "$dt"&amp;gt;&amp;gt;/opt/local/sas/shared/cleanwrk/cleanwrk.log

/bin/mailx -r "PROD-Compute&amp;lt;admindl@yourorg.com&amp;gt;" -s "SAS - PROD - Cleanwork Utility Daily Status - `hostname`" admindl@yourorg.com &amp;lt;&amp;lt;EOF
 This is an automated email from SAS Servers.

 Cleanwork Utility has been executed on `hostname`, `date`.

 Cleanwork log is available at /opt/local/sas/shared/cleanwrk/cleanwrk.log.

 Please contact your SAS Admin if there are any questions.
EOF
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281138#M5352</guid>
      <dc:creator>rsc24_in</dc:creator>
      <dc:date>2016-06-29T15:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281267#M5356</link>
      <description>&lt;P&gt;that sounds like a good option too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i currently have sasinst running sudo cleanwork where root is owner of the cleanwork program,&amp;nbsp;which is effectively the same i think.&lt;/P&gt;&lt;P&gt;i didn't think of&amp;nbsp;creating a separate root-owned copy of cleanwork, i like it i will do that.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2016 20:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281267#M5356</guid>
      <dc:creator>bheinsius</dc:creator>
      <dc:date>2016-06-29T20:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281556#M5362</link>
      <description>&lt;P&gt;Although the script is a good workaround (maybe add a md5 checksum check to satisfy your administrator), I would suggest that option if I needed to run cleanwork for 50 or more users but..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you configure the SAS WorkSpace servers to&amp;nbsp;use&amp;nbsp;&lt;SPAN&gt;SAS token authentication you only need to run the cleanwork for the users you configure&amp;nbsp;(on the &lt;SPAN class="windowItem"&gt;Options&lt;/SPAN&gt;&lt;SPAN&gt; tab of the server definition). This leaves you with a limited set of users (like sassrv and sasinst) you have to setup cleanwork for.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;For these users you can setup a crontab entry and if you also set a MAILTO= variable in your crontab the output will be send automatically. SASWork files owned by another user cannot be accessed by the current user, see the evidence below:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[sassrv@localhost ~]$ /opt/SASHome/SASFoundation/9.4/utilities/bin/cleanwork -n /tmp&lt;BR /&gt;Running as user sassrv on hostname localhost.localdomain&lt;BR /&gt;/tmp/SAS_util00010000099A_localhost.localdomain [2458]&lt;BR /&gt;cleanwork: /tmp/SAS_util00010000099F_localhost.localdomain is IN USE: [2463]&lt;BR /&gt;cleanwork: /tmp/SAS_util00010000099F_localhost.localdomain - User sassrv not owner of pid [2463]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This could be crontab entry:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;####&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;MAILTO=me@mydomain.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;# run cleanwork every hour&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;5 * * * *&amp;nbsp;/opt/SASHome/SASFoundation/9.4/utilities/bin/cleanwork /tmp 2&amp;gt;&amp;amp;1&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;hope this helps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;grtz&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;-- Mike&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2016 20:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/281556#M5362</guid>
      <dc:creator>mikev</dc:creator>
      <dc:date>2016-06-30T20:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cleanwork Deployment on UNIX SAS</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/350525#M8307</link>
      <description>&lt;P&gt;Old discussion, but just to add that arguably the 'proper' UNIX way of doing this would be using &lt;A href="https://en.wikipedia.org/wiki/Setuid" target="_self"&gt;the setuid bit&lt;/A&gt;&amp;nbsp;(already used by SAS for sasauth, sasperm and elssrv). That means that if you:&lt;/P&gt;
&lt;PRE&gt;sudo chown root cleanwork
sudo chmod u+s cleanwork&lt;/PRE&gt;
&lt;P&gt;then any subsequent execution of cleanwork will run with&amp;nbsp;root privileges, regardless of the user that executed it. You can then limit who can actually trigger cleanwork using standard UNIX execute permissions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running shell scripts as root generally isn't a great idea, which is why the setuid bit functionality is limited to binary executables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nik&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 14:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Cleanwork-Deployment-on-UNIX-SAS/m-p/350525#M8307</guid>
      <dc:creator>boemskats</dc:creator>
      <dc:date>2017-04-17T14:42:27Z</dc:date>
    </item>
  </channel>
</rss>

