SFTP Backup Block

SFTP Backup Block

Postby iamola » Wed Sep 01, 2021 2:25 pm

When the backup program tries to connect via SFTP, i get this error in the FTP log and a failure from the backup program

Code: Select all
2021-09-01 10:23:43,304 mod_sftp/1.0.0[23167]: 'subsystem' channel request for 'sftp' subsystem
2021-09-01 10:23:43,325 mod_sftp/1.0.0[23167]: using SFTP protocol version 3 for this session (channel ID 0)
2021-09-01 10:23:43,347 mod_sftp/1.0.0[23167]: OPEN command for '20210901.zip' blocked by 'STOR' handler
2021-09-01 10:23:43,367 mod_sftp/1.0.0[23167]: OPEN command for './20210901.zip' blocked by 'STOR' handler
2021-09-01 10:23:45,972 mod_sftp/1.0.0[23167]: disconnecting client (received EOF)
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: SFTP Backup Block

Postby Jocko » Wed Sep 01, 2021 3:00 pm

Hi

According to some Internet pages, it is a known issue detected by the developers.
So try this workaround :
- open a shell terminal
- run this command line
Code: Select all
sed -rie 's/SFTPOptions /SFTPOptions IgnoreSFTPUploadPerms /' /etc/finc/ftpfunc_restart.finc
(please to keep all spaces !)
- stop and start again ftp server

Then this warning should be gone
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: SFTP Backup Block

Postby iamola » Wed Sep 01, 2021 3:51 pm

Cant connect to the sftp now. I restarted the whole server and nothing

I get this when i check and uncheck the checkbox and save
Update of the FTP server, error : 1
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: SFTP Backup Block

Postby Jocko » Wed Sep 01, 2021 5:16 pm

:scratch
if you run
Code: Select all
proftpd
what is it the output ?
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: SFTP Backup Block

Postby iamola » Wed Sep 01, 2021 7:25 pm

Code: Select all
2021-09-01 15:24:51,636 CLOUD.local proftpd[3107]: warning: config file '/etc/proftpd.conf' is world-writable
2021-09-01 15:24:51,666 CLOUD.local proftpd[3107]: fatal: unknown configuration directive 'STFPOptions' on line 224 of '/etc/proftpd.conf'
2021-09-01 15:24:51,670 CLOUD.local proftpd[3107]: fatal: Did you mean: SFTPOptions


Seems like i made a mistake
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: SFTP Backup Block

Postby Jocko » Wed Sep 01, 2021 8:00 pm

Indeed there is a syntax error.

So restore the original file:
Code: Select all
cp /etc/finc/ftpfunc_restart.fince /etc/finc/ftpfunc_restart.finc
and repeat again the command
Code: Select all
sed -rie 's/SFTPOptions /SFTPOptions IgnoreSFTPUploadPerms /' /etc/finc/ftpfunc_restart.finc


(and of course check you do not repeat the error STFPOptions instead of the right syntax : SFTPOptions)
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: SFTP Backup Block

Postby iamola » Wed Sep 01, 2021 8:08 pm

Fixed the FTP error but seems like i am still getting the same issue with the file upload.

Code: Select all
2021-09-01 16:23:42,424 mod_sftp/1.0.0[2679]: 'subsystem' channel request for 'sftp' subsystem
2021-09-01 16:23:42,443 mod_sftp/1.0.0[2679]: using SFTP protocol version 3 for this session (channel ID 0)
2021-09-01 16:23:42,465 mod_sftp/1.0.0[2679]: OPEN command for '20210901.zip' blocked by 'STOR' handler
2021-09-01 16:23:42,493 mod_sftp/1.0.0[2679]: OPEN command for './20210901.zip' blocked by 'STOR' handler
2021-09-01 16:23:44,718 mod_sftp/1.0.0[2679]: disconnecting client (received EOF)
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: SFTP Backup Block

Postby iamola » Wed Sep 01, 2021 10:20 pm

I got it to work with this. Not sure why its a permission issue but ill take it.
Code: Select all
chmod ugo+rwx
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: SFTP Backup Block

Postby Jocko » Thu Sep 02, 2021 7:10 am

Hi

sftp protocol is not as defined as the ftp protocol and each on his own does a little what he likes ... Hence difficulties to configure the server because the behavior of the clients can be very different ... Yours for example wants to set permissions on the temp file opened with the command "OPEN" what is not required.

In this case the first issue was our firmware does not allow it as FTP protocol is not secure. So with my posted command sftp server overwrites this limit.

But according with your last feedback there was also another issue. proftpd runs as 'nobody' user and then that would mean the permissions on the current folder were not enough to allow its actions.
You have fixed it by your chmod command.
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France


Return to Lacie cloudbox (white casing)

Who is online

Users browsing this forum: No registered users and 10 guests