How do I mount a cifs NAS share in freePBX

Since I updated my freePBX to version 14.0.5.2 from version13 a short while ago, it seems my cifs NAS share doesn’t mount so my scripts to pass recordings to a long term archive no longer work - or at least they no longer move everything over, but rather just copy it to the mount point where the shared drive should be.

It has taken me a while to realise quit what was happening, but I am not sure how to resolve this.

This is the (generalised) mount line in the /etc/fstab file
//NAS/path/ /mnt/point cifs credentials=/root/credentials.txt,uid=500,rwx,suid 0 0

Obviously there is a matching credentials file

Anyone able to give me an idea of what I might be missing?

TIA

If there are files in the mountpoint, you will need to move them before you mount. IIRC, you can’t mount to a folder that already has files in it.

Can you manually mount the share? That will help you diagnose if you have a credentialing or permissions issue.

What OS is hosting the mountpoint? Is it another *nix box, or windows? I know with windows there was a recent change regarding permissions for cifs.

So, after cleaning out your /mnt/point folder, try:

mount -t cifs //nas/path -o username=login,password=password,rw /mnt/point

And see if it mounts.

Thanks - I’ll give that a try later tonight and get back to you.

In answer to your earlier Qs, its a nix box (freeNAS to be precise, so I freeBSD). I have manually mounted the share (and used the same credentials on a Debian based server, so its probably not the credentials - barring typos of course.

Its definitely a mount issue. I have had no issue with mounting other nix boxes - but I didn’t know about not being able to mount to a point with files already in there - that is the most likely issue as I think the scripts had already copied files to the ‘missing share’ point by the time I went looking in there and messing about… and I’ve only just realised that the reason I couldn’t see them in the shared folder was because the mount point was wrong - I’ve been hunting a privileges issue … yes, I know, the absence should have been a clue but …

I will get back to you. Thanks again

Sure you can - the existing local files simply “disappear”. I use this bug/feature all the time to tell me when one of my network drives didn’t mount correctly.

Sorry for the slow reply - I got distracted by a more pressing matter.
Anyway, the manual mount works, but only if the IP address is explicitly used - although the machine name pings quite happily.

This works
mount -t cifs //IPaddress/mount -o username=usr,password=pwd,rw /mnt/mountpoint

I tried both these
//IPaddress/mount /mnt/mountpoint cifs username=usr,password=pwd,rwx 0 0
//IPaddress/mount /mnt/mountpoint cifs credentials=/root/secret.txt,uid=500,rwx 0 0
neither worked.

I know the usr and pwd are correct because they were cut and pasted from the credentials file into a text editor to create the various strings. Clearly I am missing something … but what?

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