# Connect an external Drive in VitalPBX4 HA

**URL:** https://forums.vitalpbx.org/t/connect-an-external-drive-in-vitalpbx4-ha/2764
**Category:** VitalPBX
**Created:** [May 17, 2023, 6:25pm UTC](https://forums.vitalpbx.org/t/connect-an-external-drive-in-vitalpbx4-ha/2764 "2023-05-17T18:25:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mloaiza](https://forums.vitalpbx.org/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@mloaiza](https://forums.vitalpbx.org/u/mloaiza)
#### Post date: [May 17, 2023, 6:25pm UTC](https://forums.vitalpbx.org/t/connect-an-external-drive-in-vitalpbx4-ha/2764/1 "2023-05-17T18:25:22Z")

</div>

Continuing the discussion from [How to connect an external drive (NAS or Storage Server) in VitalPBX to store the recordings?](https://forums.vitalpbx.org/t/how-to-connect-an-external-drive-nas-or-storage-server-in-vitalpbx-to-store-the-recordings/2623):

I have no problem mounting the shared directory in which the audio are going to be recorded. I’m able to create file or directories.

When running this commands, everything seems to ve fine.:  
cd /var/spool/asterisk/  
ln -s /nfs/recordings/ monitor  
chown -R asterisk:asterisk monitor

The symbolic link was create inside /var/spool/asterisk/monitor/ and the audios files keep being save on /var/spool/asterisk/monitor

 ![ln](https://forums.vitalpbx.org/uploads/default/original/2X/8/8fc58089c6d8b29bda29d0637d792225837b6c8c.png)

Remove the symbolic link  
cd /var/spool/asterisk/  
rmdir monitor  
ln -s /nfs/recordings/ monitor  
chown -R asterisk:asterisk monitor

 ![ln](https://forums.vitalpbx.org/uploads/default/original/2X/8/8fc58089c6d8b29bda29d0637d792225837b6c8c.png)

So far, is was looking ok, but when I made a test call the audio did not get recorded (both extension had enable recording incoming/outgoing/internal)

I check the full log for that call , and it shows the directory in which the audio is going to be saved, no error  
[2023-05-17 08:40:44] WARNING[80242][C-00000001] file.c: Unable to open file /var/spool/asterisk/monitor/2023/05/17/084036-LOCAL-Q10-101-102-1684334436.0.wav: Permission denied  
[2023-05-17 08:40:44] ERROR[80242][C-00000001] app\_mixmonitor.c: Cannot open /var/spool/asterisk/monitor/2023/05/17/084036-LOCAL-Q10-101-102-1684334436.0.wav

---

<div class="post-metadata">

### Author: ![hlev](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/hlev/32/42_2.png) [@hlev](https://forums.vitalpbx.org/u/hlev)
#### Post date: [May 17, 2023, 7:31pm UTC](https://forums.vitalpbx.org/t/connect-an-external-drive-in-vitalpbx4-ha/2764/2 "2023-05-17T19:31:18Z")

</div>

Asterisk needs to be able to write to the folder, otherwise you get the permission errors you are getting.

`chown asterisk:asterisk /var/spool/asterisk/monitor`  
`chown asterisk:asterisk /mnt/monitor`

---

<div class="post-metadata">

### Author: ![system](https://forums.vitalpbx.org/uploads/default/original/1X/672b458a1d454755270c2c16adc5316b641c3c6a.png) [@system](https://forums.vitalpbx.org/u/system)
#### Post date: [June 16, 2023, 7:31pm UTC](https://forums.vitalpbx.org/t/connect-an-external-drive-in-vitalpbx4-ha/2764/3 "2023-06-16T19:31:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
