[GH-ISSUE #135] Cannot find my uploaded images on my FTP server #107

Closed
opened 2026-02-25 23:40:42 +03:00 by kerem · 4 comments
Owner

Originally created by @Xalbi on GitHub (Jan 21, 2022).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/135

Hello,

I deployed pictshare via docker on google appengine, and i configured env vars to point to my FTP server.
the upload works fine but i cannot find my images on my FTP server.

When i search for the file by the hashed name inside my docker, i find it. But on the FTP server for every upload there is new folders created like this ./0/4/3 and nothing inside.

The point is, i dont want to loose my uploaded pictures when my server goes down or when i deploy a new version.

my env vars:
FTP_SERVER: "XXXXXX"
FTP_USER: "XXX"
FTP_PASS: "XXX"
FTP_BASEDIR: "/ftp/xalbi/"

am i missing something ?
Do i need to change something in the Dockerfile so that the upload goes correctly to the FTP server ?

image

Originally created by @Xalbi on GitHub (Jan 21, 2022). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/135 Hello, I deployed pictshare via docker on google appengine, and i configured env vars to point to my FTP server. the upload works fine but i cannot find my images on my FTP server. When i search for the file by the hashed name inside my docker, i find it. But on the FTP server for every upload there is new folders created like this ./0/4/3 and nothing inside. The point is, i dont want to loose my uploaded pictures when my server goes down or when i deploy a new version. my env vars: FTP_SERVER: "XXXXXX" FTP_USER: "XXX" FTP_PASS: "XXX" FTP_BASEDIR: "/ftp/xalbi/" am i missing something ? Do i need to change something in the Dockerfile so that the upload goes correctly to the FTP server ? ![image](https://user-images.githubusercontent.com/13153320/150542002-428cfa21-6d69-4464-b3ca-d841e58b6b7f.png)
kerem closed this issue 2026-02-25 23:40:42 +03:00
Author
Owner

@geek-at commented on GitHub (Jan 22, 2022):

What's the output when you run the following command from the command line

docker exec -it <name of your pictshare container> php /var/www/tools/storagecontroller-sync.php

<!-- gh-comment-id:1019376493 --> @geek-at commented on GitHub (Jan 22, 2022): What's the output when you run the following command from the command line `docker exec -it <name of your pictshare container> php /var/www/tools/storagecontroller-sync.php`
Author
Owner

@Xalbi commented on GitHub (Jan 24, 2022):

thnx for the response :) here's the output of the command:

[i] Found storage controller FTPStorage
[i] PHASE 1
[P1] Files from Storage controllers will be downloaded if they don't exist localy
[P1] Collecting list of items from FTPStorage..
PHP Warning: ftp_mlsd(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 113

done. Got 0 files

----------- END OF PHASE 1 -----------

[i] PHASE 2
[P2] Local files are synced to all storage controllers
[P2] Looping through local files
[P2] Controller 'FTPStorage' doesn't have 374m68.png. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75
PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,17). in /var/www/storage-controllers/ftp.controller.php on line 75
done
[P2] Controller 'FTPStorage' doesn't have 54sver.jpg. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75
PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,8). in /var/www/storage-controllers/ftp.controller.php on line 75
done
[P2] Controller 'FTPStorage' doesn't have zdk5ye.png. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75
PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,18). in /var/www/storage-controllers/ftp.controller.php on line 75
done

[i] Done

----------- STATS ----------

All files found: 3 569.89 KB
Copied files: 0 0 Byte
Skipped files: 0 0 Byte
Erroneous files: 0 0 Byte

<!-- gh-comment-id:1019925830 --> @Xalbi commented on GitHub (Jan 24, 2022): _thnx for the response :) here's the output of the command:_ [i] Found storage controller FTPStorage [i] PHASE 1 [P1] Files from Storage controllers will be downloaded if they don't exist localy [P1] Collecting list of items from FTPStorage.. PHP Warning: ftp_mlsd(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 113 done. Got 0 files ----------- END OF PHASE 1 ----------- [i] PHASE 2 [P2] Local files are synced to all storage controllers [P2] Looping through local files [P2] Controller 'FTPStorage' doesn't have 374m68.png. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75 PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,17). in /var/www/storage-controllers/ftp.controller.php on line 75 done [P2] Controller 'FTPStorage' doesn't have 54sver.jpg. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75 PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,8). in /var/www/storage-controllers/ftp.controller.php on line 75 done [P2] Controller 'FTPStorage' doesn't have zdk5ye.png. Uploading unencrypted.. PHP Warning: ftp_put(): php_connect_nonb() failed: Operation in progress (115) in /var/www/storage-controllers/ftp.controller.php on line 75 PHP Warning: ftp_put(): Entering Passive Mode (172,17,0,3,82,18). in /var/www/storage-controllers/ftp.controller.php on line 75 done [i] Done ----------- STATS ---------- All files found: 3 569.89 KB Copied files: 0 0 Byte Skipped files: 0 0 Byte Erroneous files: 0 0 Byte
Author
Owner

@geek-at commented on GitHub (Jan 24, 2022):

Alright I think this is a FTP passive mode problem because you're behind NAT. I added a new config option called FTP_PASSIVEMODE which you can use to enable it (or leave it empty because it's enabled by default.

Please update to latest version and re-create your container and it should hopefully work

More insights on why that's happening here: http://www.elitehosts.com/blog/php-ftp-passive-ftp-server-behind-nat-nightmare/

<!-- gh-comment-id:1020154992 --> @geek-at commented on GitHub (Jan 24, 2022): Alright I think this is a FTP passive mode problem because you're behind NAT. I added a new config option called FTP_PASSIVEMODE which you can use to enable it (or leave it empty because it's enabled by default. Please update to latest version and re-create your container and it should hopefully work More insights on why that's happening here: http://www.elitehosts.com/blog/php-ftp-passive-ftp-server-behind-nat-nightmare/
Author
Owner

@Xalbi commented on GitHub (Jan 24, 2022):

Perfect thank you @geek-at, it works

<!-- gh-comment-id:1020213075 --> @Xalbi commented on GitHub (Jan 24, 2022): Perfect thank you @geek-at, it works
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#107
No description provided.