Tools

Calculate directory access values for CSV and ODBC

When creating users by CSV file or directly in an ODBC database, it is necessary to tell Serv-U programmatically what permissions the user will be granted. The permissions must be specified in a specific format determined via the method outlined below:

First published date

11/14/2018 6:10 PM

Last published date

11/14/2018 6:10 PM

Overview

Calculating DirAccess Values

When creating users by CSV file or directly in an ODBC database , it is necessary to tell Serv-U programmatically what permissions the user will be granted. The permissions must be specified in a specific format determined via the method outlined below:


 

Product section

Serv-U Managed File Transfer & Serv-U FTP Server

Resolution

To calculate the value of a DirAccess entry, the appropriate values (represented in hexadecimal below) must be added and converted to decimal, then used in the DirAccess column of the CSV file. Each value represents a specific bit which can be turned on or off by adding or removing that value. For example, to grant Read/Write/List access, you add:

1
+2
+100
=103

 

This value must then be converted to hex, which can be done by opening the Windows Calculator (Start > All Programs > Accessories > Calculator), changing it to Scientific Mode (View > Scientific Mode), selecting Hex, typing in the value, then selecting "Dec" for an automatic conversion. For example, hexadecimal 103 and decimal 259 are the same value. 259 is the value that should be entered in the DirAccess column for the appropriate user. The values of all permissions are listed below.

File Permissions Read = 0x00000001
Write = 0x00000002
Append = 0x00000004
Delete = 0x00000008
Rename = 0x00000010
Execute = 0x00000020

Directory Permissions List = 0x00000100
Create = 0x00000200
Remove = 0x00000400
Rename = 0x00000800

Subdirectory Permissions Inherit = 0x00001000

Disclaimer: Please note, any content posted herein is provided as a suggestion or recommendation to you for your internal use. This is not part of the SolarWinds software or documentation that you purchased from SolarWinds, and the information set forth herein may come from third parties. Your organization should internally review and assess to what extent, if any, such custom scripts or recommendations will be incorporated into your environment.  You elect to use third party content at your own risk, and you will be solely responsible for the incorporation of the same, if any.