<?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: how to protect sas datasets from being deleted accidently on a Unix server%0D%0A in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/968007#M45971</link>
    <description>&lt;P&gt;In UNIX, deleting a file starts with removing a directory entry. So the necessary permission for deleting a file is the write permission on the directory; if you also need to be able to create files there, removing the write permission is not feasible.&lt;/P&gt;
&lt;P&gt;One trick you can do from the OS: create a second physical (within the same physical filesystem) link to the file (ln command). If you accidentally remove the first link, the second link will prevent the actual delete (which means removing the inode and freeing the used clusters), and you can recreate the original directory entry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having a system backup (daily/incremental) is a total must, of course.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jun 2025 07:52:22 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2025-06-03T07:52:22Z</dc:date>
    <item>
      <title>how to protect sas datasets from being deleted accidently on a Unix server%0D%0A</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967975#M45967</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have may sas datasets into sub folder sas2001 until sas2024 and I looking for a Unix command to protect the folder and the sas datasets from being deleted.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;I have executed the Kernel scirpt below

# Change directory to the target directory
cd /finsys/.../LEGO_6141_Restore_sasdatasets_in_sasdata_folder/Notes_LEGO_6141_test.txt

# Set permissions for all files
find . -type f -exec chmod 644 {} \;

# Set permissions for all directories
find . -type d -exec chmod 755 {} \;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I was able to delete the file directly from winscp&lt;/P&gt;
&lt;P&gt;Any suggestion ?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 21:26:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967975#M45967</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-06-02T21:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to protect sas datasets from being deleted accidently on a Unix server%0D%0A</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967979#M45968</link>
      <description>&lt;P&gt;Server backups are the usual way to protect against deletion. In my organisation I simply request a restore of the deleted files. That way you are protected regardless of how files are deleted or corrupted.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 22:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967979#M45968</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-06-02T22:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to protect sas datasets from being deleted accidently on a Unix server%0D%0A</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967983#M45969</link>
      <description>&lt;P&gt;Whether or not you can delete a file depends on the permission of the directory the file lives in, not the permissions on the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you told Unix that you were allowed to write to the directory that means you can delete the file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To prevent you from deleting the file remove the write bit from the directory.&amp;nbsp; Or have the directory owned by someone else, like a system account.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 23:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967983#M45969</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-06-02T23:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to protect sas datasets from being deleted accidently on a Unix server%0D%0A</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967990#M45970</link>
      <description>&lt;P&gt;I am not sure. But it is a desired way to try (adding a password to prevent from deleting).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;
data x(&lt;STRONG&gt;alter='xxx'&lt;/STRONG&gt;);
 set sashelp.class;
run;

proc delete data=x;run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jun 2025 01:06:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/967990#M45970</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-06-03T01:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to protect sas datasets from being deleted accidently on a Unix server%0D%0A</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/968007#M45971</link>
      <description>&lt;P&gt;In UNIX, deleting a file starts with removing a directory entry. So the necessary permission for deleting a file is the write permission on the directory; if you also need to be able to create files there, removing the write permission is not feasible.&lt;/P&gt;
&lt;P&gt;One trick you can do from the OS: create a second physical (within the same physical filesystem) link to the file (ln command). If you accidentally remove the first link, the second link will prevent the actual delete (which means removing the inode and freeing the used clusters), and you can recreate the original directory entry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Having a system backup (daily/incremental) is a total must, of course.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2025 07:52:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-protect-sas-datasets-from-being-deleted-accidently-on-a/m-p/968007#M45971</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-06-03T07:52:22Z</dc:date>
    </item>
  </channel>
</rss>

