Skip to content

Commit 3cd8e92

Browse files
authored
Merge pull request #82053 from and-rewsmith/patch-2
IoTEdge Host Storage Documentation Update
2 parents a31e3c1 + 1f184ff commit 3cd8e92

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

articles/iot-edge/how-to-access-host-storage-from-module.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,25 @@ Replace `<HostStoragePath>` and `<ModuleStoragePath>` with your host and module
7171

7272
For example, on a Linux system, `"Binds":["/etc/iotedge/storage/:/iotedge/storage/"]` means the directory **/etc/iotedge/storage** on your host system is mapped to the directory **/iotedge/storage/** in the container. On a Windows system, as another example, `"Binds":["C:\\temp:C:\\contemp"]` means the directory **C:\\temp** on your host system is mapped to the directory **C:\\contemp** in the container.
7373

74-
Additionally, on Linux devices, make sure that the user profile for your module has the required read, write, and execute permissions to the host system directory. Returning to the earlier example of enabling IoT Edge hub to store messages in your device's local storage, you need to grant permissions to its user profile, UID 1000. (The IoT Edge agent operates as root, so it doesn't need additional permissions.) There are several ways to manage directory permissions on Linux systems, including using `chown` to change the directory owner and then `chmod` to change the permissions, such as:
74+
You can find more details about create options from [docker docs](https://docs.docker.com/engine/api/v1.32/#operation/ContainerCreate).
75+
76+
## Host system permissions
77+
78+
On Linux devices, make sure that the user profile for your module has the required read, write, and execute permissions to the host system directory. Returning to the earlier example of enabling IoT Edge hub to store messages in your device's local storage, you need to grant permissions to its user profile, UID 1000. There are several ways to manage directory permissions on Linux systems, including using `chown` to change the directory owner and then `chmod` to change the permissions, such as:
7579

7680
```bash
7781
sudo chown 1000 <HostStoragePath>
7882
sudo chmod 700 <HostStoragePath>
7983
```
8084

81-
You can find more details about create options from [docker docs](https://docs.docker.com/engine/api/v1.32/#operation/ContainerCreate).
85+
On Windows devices, you will also need to configure permissions on the host system directory. You can use PowerShell to set permissions:
86+
87+
```powershell
88+
$acl = get-acl <HostStoragePath>
89+
$ace = new-object system.security.AccessControl.FileSystemAccessRule('Authenticated Users','FullControl','Allow')
90+
$acl.AddAccessRule($ace)
91+
$acl | Set-Acl
92+
```
8293

8394
## Encrypted data in module storage
8495

0 commit comments

Comments
 (0)