FTP issues

Status
Not open for further replies.

didimkhn

Founder license
License owner
Joined
Oct 10, 2013
Messages
9
Points
51
Hi
SuccessfulFTPconnectionforexternalstorage,butfailedtoupload the image.
This is the PHPerrorlog.
Whatis the solution?

#7 {main}

[18-Dec-2014 15:06:51 Asia/Hong_Kong] Can't upload image - Storage error: Can't change dir in CHV\Ftp::put

[18-Dec-2014 15:07:23 Asia/Hong_Kong] Can't change dir '/Web/hosting2014/12/18/' in CHV\Ftp::put

[18-Dec-2014 15:07:23 Asia/Hong_Kong] exception 'CHV\FtpException' with message 'Can't change dir in CHV\Ftp::put' in E:\chevereto_3.5.11\chevereto\app\lib\classes\class.ftp.php:79
Stack trace:
#0 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.storage.php(122): CHV\Ftp->put(Array)
#1 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.image.php(665): CHV\Storage::uploadFiles(Array, Array, Array)
#2 E:\chevereto_3.5.11\chevereto\app\routes\route.json.php(86): CHV\Image::uploadToWebsite(Array, Array, Array)
#3 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(206): G\Handler->{closure}(Object(G\Handler))
#4 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(110): G\Handler->processRequest()
#5 E:\chevereto_3.5.11\chevereto\app\loader.php(258): G\Handler->__construct(Array)
#6 E:\chevereto_3.5.11\chevereto\index.php(20): include_once('E:\\chevereto_3....')
#7 {main}

[18-Dec-2014 15:07:23 Asia/Hong_Kong] Can't upload image - Storage error: Can't change dir in CHV\Ftp::put

[18-Dec-2014 15:07:38 Asia/Hong_Kong] Can't change dir '/images2014/12/18/' in CHV\Ftp::put

[18-Dec-2014 15:07:38 Asia/Hong_Kong] exception 'CHV\FtpException' with message 'Can't change dir in CHV\Ftp::put' in E:\chevereto_3.5.11\chevereto\app\lib\classes\class.ftp.php:79
Stack trace:
#0 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.storage.php(122): CHV\Ftp->put(Array)
#1 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.image.php(665): CHV\Storage::uploadFiles(Array, Array, Array)
#2 E:\chevereto_3.5.11\chevereto\app\routes\route.json.php(86): CHV\Image::uploadToWebsite(Array, Array, Array)
#3 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(206): G\Handler->{closure}(Object(G\Handler))
#4 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(110): G\Handler->processRequest()
#5 E:\chevereto_3.5.11\chevereto\app\loader.php(258): G\Handler->__construct(Array)
#6 E:\chevereto_3.5.11\chevereto\index.php(20): include_once('E:\\chevereto_3....')
#7 {main}

[18-Dec-2014 15:07:38 Asia/Hong_Kong] Can't upload image - Storage error: Can't change dir in CHV\Ftp::put

[18-Dec-2014 15:25:43 Asia/Hong_Kong] Can't change dir '/images2014/12/18/' in CHV\Ftp::put

[18-Dec-2014 15:25:43 Asia/Hong_Kong] exception 'CHV\FtpException' with message 'Can't change dir in CHV\Ftp::put' in E:\chevereto_3.5.11\chevereto\app\lib\classes\class.ftp.php:79
Stack trace:
#0 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.storage.php(122): CHV\Ftp->put(Array)
#1 E:\chevereto_3.5.11\chevereto\app\lib\classes\class.image.php(665): CHV\Storage::uploadFiles(Array, Array, Array)
#2 E:\chevereto_3.5.11\chevereto\app\routes\route.json.php(86): CHV\Image::uploadToWebsite(Array, Array, Array)
#3 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(206): G\Handler->{closure}(Object(G\Handler))
#4 E:\chevereto_3.5.11\chevereto\lib\G\classes\class.handler.php(110): G\Handler->processRequest()
#5 E:\chevereto_3.5.11\chevereto\app\loader.php(258): G\Handler->__construct(Array)
#6 E:\chevereto_3.5.11\chevereto\index.php(20): include_once('E:\\chevereto_3....')
#7 {main}

[18-Dec-2014 15:25:43 Asia/Hong_Kong] Can't upload image - Storage error: Can't change dir in CHV\Ftp::put
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Make sure that FTP user permissions are correct.
In what way? I'm running cPanel. Thanks!

EDIT:
Works when Storage mode set to Direct.
 
Last edited:

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Yes, already done, i chmod folder to 777 but it's not help. I tried with root account, same error.
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Okay, i tested to set up to my VPS, but the same.
All my WHW/cPanel backups go to my second server VPS every day with root access. There root can read/write/create/delete, etc. In the same VPS server and folder i configure External storage using sFTP and root access but again same error.
Im using pure-ftpd - Umask 133:022
 
Last edited:

didimkhn

Founder license
License owner
Joined
Oct 10, 2013
Messages
9
Points
51
Could not resolve.
Errors are caused by deleted files after Qnap NAS server FTP connection.
Looking for a solution
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Today i will try configure to DigitalOcean VPS and let you know whats happen.
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
15,625
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
Guys... The FTP/SFTP implementation can't fix issues inherited by the setup of the FTP account. System only issues common FTP commands to put/delete files and it works with most servers out there, but a donzen things can happen like permission issues, FTP accounts that can't create writable folders and limitations to the connection issued by the host FTP server.

That said, please make sure that the accounts works OK. I tested both protocols (FTP and SFTP) with a standar server and worked 100%. Sadly it not just touch a line to debug what could happen with a given FTP server and for what I've saw, is always FTP host issues related to permissions and limitations.
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
I don't know, i tried to 4 different servers and always same. Are you tried to arvixe.com?
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Im mean an external FTP to Arvixe server from an other server.
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Okay, thank you. My chevereto site are hosted to my server and i would like host images to Arvixe.
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
I found solution, just need to add correct patch.

@didimkhn look at your error log and you will see this:
Code:
'/Web/hosting2014/12/18/' in CHV
hosting2014 must be hosting/2014

because your patch is:
Code:
/Web/hosting
must be:
Code:
/Web/hosting/
SLASH at the end!

But there is another problem, pictures not removed from server after delete.
 

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
15,625
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
Okay, thank you. My chevereto site are hosted to my server and i would like host images to Arvixe.
I was able to connect to the Arvixe's FTP server, just a little trick... Always test the thing using a FTP client then put that data in the Chevereto dashboard. When I created the FTP account in Arvixe the data shown by CPanel was this:

FTP username: demo@chevereto.com
FTP server: ftp.chevereto.com
FTP & explicit FTPS port: 21
Path: /home/chevereto/public_html/demo
And that data isn't correct in my case because ftp.chevereto.com doesn't exists (I removed that). So to connect to this FTP server I must use the direct IP of the server or the hostname that they give to you (something.arvixe.com). In my case I'm using cloudflare so chevereto.com doesn't resolve to Arvixe. Finally, the path that you must enter is just "/" (without quotes).

So at the end, the configuration should be:
FTP username: demo@chevereto.com
FTP server: <IP ADDRESS OR HOSTNAME OF YOUR SERVER>
FTP & explicit FTPS port: 21
Path: /
But that depends from server to server (this one is for Arvixe). In other servers the username can be just "username" without @mydomain.com, in other servers you must use a non-standar port (in those cases use hostname:<port>. Like I said, test the connection before doing the thing.
 

afternov

Network license
License owner
Joined
Jan 3, 2015
Messages
29
Points
53
Yes, excellent, thanks for your time! And if you delete uploaded pictures from chevereto website, the are removed from Arvixe server or not?
 
Status
Not open for further replies.