Files.GetPosixPermissions
-------------------------

Queries posix file permissions.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Files](component_Files.md) | [4.3](newinversion43.md) | ✅ Yes | ❌ No | ✅ Yes | ✅ Yes, on macOS and Linux | ✅ Yes |

MBS( "Files.GetPosixPermissions"; Path ) 

**MBS**( **"Files.GetPosixPermissions";** /\* Queries posix file permissions. \*/  
**$Path**) /\* The native path to the file or folder.e.g. "/Users/John/Desktop/test.txt" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native path to the file or folder. | "/Users/John/Desktop/test.txt" |

### Result

Returns OK or error message.

### Description

Queries posix file permissions.  
Path must be valid and exist.  
This function needs a native path. Please use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) function in order to convert a FileMaker style path to a native path.   
See chmod command manual page. The plugin converts parameter to string and parses it as octal number. This way you can pass 777 as number and it's interpreted as expected.  
### Examples

Query permissions:

 MBS ( "Files.GetPosixPermissions"; "/Users/cs/Desktop/test" )  
\# shows for example 755   
### See also

- [Files.SetPosixPermissions](FilesSetPosixPermissions.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)

### Blog Entries

- [MBS Filemaker Plugin, version 4.3pr1](https://www.mbsplugins.de/archive/2014-07-02/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2020, Seite 34](https://filemaker-magazin.de/neuigkeit/4103-Appetithappen-FMM_202004)

This function checks for a license.

Created 18th August 2014 , last changed 29th May 2017

  
[Files.GetPathFromNodeID](FilesGetPathFromNodeID.md) - [Files.GetTagNames](FilesGetTagNames.md)

[HTML Version](FilesGetPosixPermissions.shtml)