SFTP Storage

DidierDE

Bronze Partner
Advanced Certified
Joined
Nov 12, 2025
Messages
11
Reaction score
1
Hello,

I'm trying to configure remote storage with SFTP.

In the logs of our SFTP server, I see this:
Jul 09 15:12:15 EBOSLBE1-SFTP01 sshd[38449]: Accepted password for sftp-user from 10.x.x.x port 43898 ssh2
Jul 09 15:12:15 EBOSLBE1-SFTP01 sshd[38449]: pam_unix(sshd:session): session opened for user sftp-user by (uid=0)
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[1]: Created slice User Slice of sftp-user.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[1]: Starting User Manager for UID 1001...
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: pam_unix(systemd-user:session): session opened for user sftp-user by (uid=0)
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[1]: Started Session 274966 of user sftp-user.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd-logind[960]: New session 274966 of user sftp-user.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Reached target Paths.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Listening on GnuPG network certificate management daemon.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Reached target Timers.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Listening on GnuPG cryptographic agent and passphrase cache.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Reached target Sockets.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Reached target Basic System.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[1]: Started User Manager for UID 1001.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Reached target Default.
Jul 09 15:12:15 EBOSLBE1-SFTP01 systemd[38452]: Startup finished in 33ms.
Jul 09 15:12:16 EBOSLBE1-SFTP01 sshd[38526]: Received disconnect from 10.x.x.x port 43898:11: Connection terminated by the client.
Jul 09 15:12:16 EBOSLBE1-SFTP01 sshd[38526]: Disconnected from user sftp-user 10.x.x.x port 43898
Jul 09 15:12:16 EBOSLBE1-SFTP01 sshd[38449]: pam_unix(sshd:session): session closed for user sftp-user


So the connection works and credentials are ok, but the pbx disconnects.

I don't know how the backup path needs to be formatted.

If I set it as ./sftp/3CX or /sftp/3CX, I get a Permission Denied error.
If I set it as .\sftp\3CX or \sftp\3CX, I get a No Such File error.

Has anyone encountered this before?

3CX version is Version 20.0 Update 9 (Build 995 Release - AI 1.4.48) - Self hosted
 
@DidierDE put the PBX in Verbose mode and check the " 3cxManagementConsole.log " .
 
@DidierDE put the PBX in Verbose mode and check the " 3cxManagementConsole.log " .
In the 3cxManagementConsole.log I see this:

2026-07-10 08:49:47.676|0026|Trace| [XAPI.RemoteArchivingSettingsController] Need to create remote folder sftp://192.168.x.x/sftp/3CX
2026-07-10 08:49:48.315|0026|Error| [XAPI.RemoteArchivingSettingsController] Failed to create remote folder sftp://192.168.x.x/sftp/3CX: Permission denied
2026-07-10 08:49:48.315|0026|Error| [XAPI.RemoteArchivingSettingsController] RemoteArchivingSettings: Backups: Permission denied

I have also tried creating the 3CX folder myself on the sftp server but I always get the 'Permission denied' error.
The SFTP user has full control over the sftp folder.
 
From the command line of the 3CX server, I can also start a sftp session to the sftp server and browse to the 3CX folder.
 
@DidierDE from the logs of the PBX you have " Permission denied ".
For the same request on the logs of the sFTP, what do you see ?
 
@DidierDE from the logs of the PBX you have " Permission denied ".
For the same request on the logs of the sFTP, what do you see ?
Jul 10 11:30:17 EBOSLBE1-SFTP01 sshd[34451]: Accepted password for sftp-user from 10.x.x.x port 44828 ssh2
Jul 10 11:30:17 EBOSLBE1-SFTP01 sshd[34451]: pam_unix(sshd:session): session opened for user sftp-user by (uid=0)
Jul 10 11:30:17 EBOSLBE1-SFTP01 systemd[1]: Started Session 275529 of user sftp-user.
Jul 10 11:30:17 EBOSLBE1-SFTP01 systemd-logind[960]: New session 275529 of user sftp-user.
Jul 10 11:30:18 EBOSLBE1-SFTP01 sshd[34517]: Received disconnect from 10.x.x.x port 44828:11: Connection terminated by the client.
Jul 10 11:30:18 EBOSLBE1-SFTP01 sshd[34517]: Disconnected from user sftp-user 10.x.x.x port 44828
Jul 10 11:30:18 EBOSLBE1-SFTP01 sshd[34451]: pam_unix(sshd:session): session closed for user sftp-user
Jul 10 11:30:18 EBOSLBE1-SFTP01 systemd-logind[960]: Removed session 275529.
 
@DidierDE this is for the connection, check for the " Failed to create remote folder " log on the sFTP
as this is what is shown on the PBX logs above :


2026-07-10 08:49:48.315|0026|Error| [XAPI.RemoteArchivingSettingsController] Failed to create remote folder sftp://192.168.x.x/sftp/3CX: Permission denied
 
@DidierDE this is for the connection, check for the " Failed to create remote folder " log on the sFTP
as this is what is shown on the PBX logs above :


2026-07-10 08:49:48.315|0026|Error| [XAPI.RemoteArchivingSettingsController] Failed to create remote folder sftp://192.168.x.x/sftp/3CX: Permission denied
I suppose this should be in the vsftpd.log file? I see that the file is created, but it is empty.

The weird thing is that from the CLI of the 3CX server, I can start an SFTP session to the sftp server and I can create and remove folders. So it has nothing to do with user rights.
 
@DidierDE please ensure thay you have the below rights setup on the FTP side for the user
that is setup on the PBX side :


1783689197472.png
 
@DidierDE please ensure thay you have the below rights setup on the FTP side for the user
that is setup on the PBX side :


View attachment 52019
Yes, that is the case.

As you can see here, the sftp-user has rwx rights on the 3CX folder:
1783690006340.png

As I stated before, from the CLI of the 3CX server, I can start an SFTP session to the SFTP server and create and remove directories. This user is also used by other services that need SFTP access and we never had issues. It must have something to do with the way 3CX accesses the server.
 
If you TEMPORARILY do a chmod 777 on the folder on the vsftpd machine, do things start to work? It might help to understand if we are troubleshooting the FTP server rather than the FTP client.

I find it VERY UNLIKELY to be the client, but this might help eliminate some variables.
 
  • Like
Reactions: Evolute IT
@DidierDE please open a ticket and we can take it from there.
 
If you TEMPORARILY do a chmod 777 on the folder on the vsftpd machine, do things start to work? It might help to understand if we are troubleshooting the FTP server rather than the FTP client.

I find it VERY UNLIKELY to be the client, but this might help eliminate some variables.
I had already tried that, but it did not fix the issue.

Why do you find it unlikely to be a client issue? I can successfully start a SFTP session from the CLI of the 3CX server and create and remove folders and files, and we are using that same server for other clients that have no issues...
 

Members Online Now

Forum statistics

Threads
111,832
Messages
589,284
Members
164,662
Latest member
DejanMDS