CURL.SetOptionNewDirectoryPerms
-------------------------------

Sets the new directory permissions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionNewDirectoryPerms"; curl; Value ) 

**MBS**( **"CURL.SetOptionNewDirectoryPerms";** /\* Sets the new directory permissions. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The permissions value. (octal value!)e.g. 7\*8\*8+5\*8+5 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The permissions value. (octal value!) | 7\*8\*8+5\*8+5 |

### Result

Returns "OK" on success.

### Description

Sets the new directory permissions.  
Pass a number as a parameter, containing the value of the permissions that will be assigned to newly created directories on the remote server. The default value is 0755, but any valid value can be used. The only protocols that can use this are sftp://, scp://, and file://.  
Values are specified in octal, so octal 755 is decimal 493. Octal 644 is 420 (6\*8\*8+4\*8+4).  
See also [NEW\_DIRECTORY\_PERMS](https://curl.haxx.se/libcurl/c/CURLOPT_NEW_DIRECTORY_PERMS.html) option in CURL manual.

### See also

- [CURL.SetOptionNewFilePerms](CURLSetOptionNewFilePerms.md)

Created 18th August 2014 , last changed 24th March 2021

  
[CURL.SetOptionNetRC](CURLSetOptionNetRC.md) - [CURL.SetOptionNewFilePerms](CURLSetOptionNewFilePerms.md)

[HTML Version](CURLSetOptionNewDirectoryPerms.shtml)