<?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: Is directory writable returns 0 when directory is writable in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571362#M78107</link>
    <description>&lt;P&gt;Verify the path exists with IsDirectory() before IsDirectoryWritable(). If the directory does not exist (misspelled, etc),&amp;nbsp;IsDirectoryWritable reports false, not an error. IsDirectory() reports false for a bad name. Possibly a drive mapping issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my quick testing, the function appears to be testing Windows permissions, not actually doing an end-to-end test. For my Linux drives attached to VirtualBox, it always reports true (writable) regardless of the Linux permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="User Permissions" style="width: 364px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47493i2297C47299C68074/image-size/large?v=v2&amp;amp;px=999" role="button" title="PrivUser.PNG" alt="User Permissions" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;User Permissions&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Admin Permissions" style="width: 375px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47492i941EA6E396839242/image-size/large?v=v2&amp;amp;px=999" role="button" title="PrivAdmin.PNG" alt="Admin Permissions" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Admin Permissions&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm running as user, not admin, and folders without write permission have isDirectoryWritable==false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally: there is an ancient option that I believe is not involved:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Directories don't really have a read-only attribute." style="width: 370px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47494iC728474531680FE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="ReadOnlyAttribute.PNG" alt="Directories don't really have a read-only attribute." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Directories don't really have a read-only attribute.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That square is a third state, neither checked or unchecked.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://superuser.com/questions/1580751/folders-created-with-read-only-attribute-and-i-cannot-remove" target="_blank"&gt;https://superuser.com/questions/1580751/folders-created-with-read-only-attribute-and-i-cannot-remove&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 19 Nov 2022 10:55:13 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2022-11-19T10:55:13Z</dc:date>
    <item>
      <title>Is directory writable returns 0 when directory is writable</title>
      <link>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571335#M78105</link>
      <description>I have an issue that users who previously had read only access to network drives, when provided read write access still cause is directory writable() to return 0 when in the directory, after having been granted access. Users have verified that they can open a folder, make a file, update a file, and delete a file in the directory in question. Anyone else have this issue before. This has made it difficult to set up data validation regarding save directories.</description>
      <pubDate>Fri, 09 Jun 2023 16:02:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571335#M78105</guid>
      <dc:creator>Mfoltz80</dc:creator>
      <dc:date>2023-06-09T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is directory writable returns 0 when directory is writable</title>
      <link>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571362#M78107</link>
      <description>&lt;P&gt;Verify the path exists with IsDirectory() before IsDirectoryWritable(). If the directory does not exist (misspelled, etc),&amp;nbsp;IsDirectoryWritable reports false, not an error. IsDirectory() reports false for a bad name. Possibly a drive mapping issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my quick testing, the function appears to be testing Windows permissions, not actually doing an end-to-end test. For my Linux drives attached to VirtualBox, it always reports true (writable) regardless of the Linux permissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what I see:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="User Permissions" style="width: 364px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47493i2297C47299C68074/image-size/large?v=v2&amp;amp;px=999" role="button" title="PrivUser.PNG" alt="User Permissions" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;User Permissions&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Admin Permissions" style="width: 375px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47492i941EA6E396839242/image-size/large?v=v2&amp;amp;px=999" role="button" title="PrivAdmin.PNG" alt="Admin Permissions" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Admin Permissions&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm running as user, not admin, and folders without write permission have isDirectoryWritable==false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally: there is an ancient option that I believe is not involved:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Directories don't really have a read-only attribute." style="width: 370px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47494iC728474531680FE3/image-size/large?v=v2&amp;amp;px=999" role="button" title="ReadOnlyAttribute.PNG" alt="Directories don't really have a read-only attribute." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Directories don't really have a read-only attribute.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That square is a third state, neither checked or unchecked.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://superuser.com/questions/1580751/folders-created-with-read-only-attribute-and-i-cannot-remove" target="_blank"&gt;https://superuser.com/questions/1580751/folders-created-with-read-only-attribute-and-i-cannot-remove&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 10:55:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571362#M78107</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-11-19T10:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is directory writable returns 0 when directory is writable</title>
      <link>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571473#M78116</link>
      <description>My guess is that your are right. My IT group are likely just updating the first write status for users to be enabled. But jmp may be requiring the second “ancient” field to not be read only ( completely unchecked) when updating user privileges for the is directory writable to return 0. And my IT team doesn’t realize they need to fix that location as well…&lt;BR /&gt;&lt;BR /&gt;Makes sense that it’s not an end to end test through. As they obviously have read-write access.&lt;BR /&gt;&lt;BR /&gt;Have already run the is is directory command ahead to confirm the path is input correctly and exists. And it does return 1. Thanks for suggesting that as an initial sanity check.&lt;BR /&gt;&lt;BR /&gt;I will also ask IT to check the drive mapping for that directory. And will check back if I discover a resolution.&lt;BR /&gt;&lt;BR /&gt;Anyone have a jsl script that does an end to end version of is directory writable that I could sub in for the check that JMP is doing? That might be the better long term fix for this issue…</description>
      <pubDate>Sun, 20 Nov 2022 14:20:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-directory-writable-returns-0-when-directory-is-writable/m-p/571473#M78116</guid>
      <dc:creator>Mfoltz80</dc:creator>
      <dc:date>2022-11-20T14:20:23Z</dc:date>
    </item>
  </channel>
</rss>

