drakkan / sftpgo

Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob
https://sftpgo.com
GNU Affero General Public License v3.0
9.4k stars 730 forks source link

[Bug]: Docker version has a weird bug #1754

Open alfi4000 opened 2 months ago

alfi4000 commented 2 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Hello I tried to add images for branding just for fun but the log says no such file or directory doesn't matter if it is favicon or logo! Same for when I try to add the plugin for geoipfilter I have tried several paths but every time same error! Paths I tried: /usr/local/bin a created parent path: /home/local-storage /home/ubuntu and on time in the home directory: /home I am using ubuntu! I even gave permission in those directories with: sudo chown -R 1000:1000

Steps to reproduce

  1. install with my command
  2. try add path for any modification

Expected behavior

-

SFTPGo version

latest

Data provider

-

Installation method

Community Docker image

Configuration

config

Relevant log output

{"level":"warn","time":"2024-09-10T04:11:44.847","sender":"config","message":"error loading configuration file: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"error","time":"2024-09-10T04:11:44.847","sender":"service","message":"error loading configuration: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"info","time":"2024-09-10T04:13:27.817","sender":"service","message":"starting SFTPGo 2.6.2-636a1c2c-2024-06-21T17:33:00Z +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite +unixcrypt +portable, config dir: ., config file: , log max size: 10 log max backups: 5 log max age: 28 log level: debug, log compress: false, log utc time: false, load data from: \"\", grace time: 0 secs"}
{"level":"info","time":"2024-09-10T04:13:27.817","sender":"config","message":"unable to read env files from \"env.d\": open env.d: no such file or directory"}
{"level":"warn","time":"2024-09-10T04:13:27.818","sender":"config","message":"error loading configuration file: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"error","time":"2024-09-10T04:13:27.818","sender":"service","message":"error loading configuration: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"info","time":"2024-09-10T04:14:33.337","sender":"service","message":"starting SFTPGo 2.6.2-636a1c2c-2024-06-21T17:33:00Z +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite +unixcrypt +portable, config dir: ., config file: , log max size: 10 log max backups: 5 log max age: 28 log level: debug, log compress: false, log utc time: false, load data from: \"\", grace time: 0 secs"}
{"level":"info","time":"2024-09-10T04:14:33.338","sender":"config","message":"unable to read env files from \"env.d\": open env.d: no such file or directory"}
{"level":"warn","time":"2024-09-10T04:14:33.339","sender":"config","message":"error loading configuration file: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"error","time":"2024-09-10T04:14:33.339","sender":"service","message":"error loading configuration: While parsing config: invalid character 'â' looking for beginning of value"}
{"level":"info","time":"2024-09-10T04:15:45.238","sender":"service","message":"starting SFTPGo 2.6.2-636a1c2c-2024-06-21T17:33:00Z +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite +unixcrypt +portable, config dir: ., config file: , log max size: 10 log max backups: 5 log max age: 28 log level: debug, log compress: false, log utc time: false, load data from: \"\", grace time: 0 secs"}
{"level":"info","time":"2024-09-10T04:15:45.239","sender":"config","message":"unable to read env files from \"env.d\": open env.d: no such file or directory"}
{"level":"debug","time":"2024-09-10T04:15:45.253","sender":"config","message":"config file used: '\"/etc/sftpgo/sftpgo.json\"', config loaded: {Common:{IdleTimeout:15 UploadMode:0 Actions:{ExecuteOn:[] ExecuteSync:[] Hook:} SetstatMode:0 RenameMode:0 ResumeMaxSize:0 TempPath: ProxyProtocol:0 ProxyAllowed:[] ProxySkipped:[] StartupHook: PostConnectHook: PostDisconnectHook: DataRetentionHook: MaxTotalConnections:0 MaxPerHostConnections:20 AllowListStatus:1 AllowSelfConnections:0 DefenderConfig:{Enabled:true Driver:memory BanTime:30 BanTimeIncrement:50 Threshold:15 ScoreInvalid:2 ScoreValid:1 ScoreLimitExceeded:3 ScoreNoAuth:0 ObservationTime:30 EntriesSoftLimit:100 EntriesHardLimit:150 LoginDelay:{Success:0 PasswordFailed:1000}} RateLimitersConfig:[{Average:0 Period:1000 Burst:1 Type:2 Protocols:[SSH FTP DAV HTTP] GenerateDefenderEvents:false EntriesSoftLimit:100 EntriesHardLimit:150}] Umask: ServerVersion: Metadata:{Read:0} idleTimeoutAsDuration:0 idleLoginTimeout:0 defender:<nil> allowList:<nil> rateLimitersList:<nil> proxyAllowed:[] proxySkipped:[]} ACME:{Email: KeyType:4096 CertsPath:certs CAEndpoint:https://acme-v02.api.letsencrypt.org/directory Domains:[] RenewDays:30 HTTP01Challenge:{Port:80 WebRoot: ProxyHeader:} TLSALPN01Challenge:{Port:0} accountConfigPath: accountKeyPath: lockPath: tempDir:} SFTPD:{Bindings:[{Address: Port:2022 ApplyProxyConfig:true}] MaxAuthTries:0 HostKeys:[] HostCertificates:[] HostKeyAlgorithms:[] KexAlgorithms:[] MinDHGroupExchangeKeySize:2048 Ciphers:[] MACs:[] PublicKeyAlgorithms:[] TrustedUserCAKeys:[] RevokedUserCertsFile: LoginBannerFile: EnabledSSHCommands:[md5sum sha1sum sha256sum cd pwd scp] KeyboardInteractiveAuthentication:true KeyboardInteractiveHook: PasswordAuthentication:true certChecker:<nil> parsedUserCAKeys:[]} FTPD:{Bindings:[{Address: Port:2121 ApplyProxyConfig:true TLSMode:0 TLSSessionReuse:0 CertificateFile: CertificateKeyFile: MinTLSVersion:12 ForcePassiveIP: PassiveIPOverrides:[] PassiveHost: ClientAuthType:0 TLSCipherSuites:[] PassiveConnectionsSecurity:0 ActiveConnectionsSecurity:0 IgnoreASCIITransferType:0 Debug:false ciphers:[]}] BannerFile: CertificateFile: CertificateKeyFile: CACertificates:[] CARevocationLists:[] ActiveTransfersPortNon20:true DisableActiveMode:false EnableSite:false HASHSupport:0 CombineSupport:0 PassivePortRange:{Start:50000 End:50100} acmeDomain:} WebDAVD:{Bindings:[{Address: Port:10080 EnableHTTPS:false CertificateFile: CertificateKeyFile: MinTLSVersion:12 ClientAuthType:0 TLSCipherSuites:[] Protocols:[] Prefix: ProxyAllowed:[] ClientIPProxyHeader: ClientIPHeaderDepth:0 DisableWWWAuthHeader:false allowHeadersFrom:[]}] CertificateFile: CertificateKeyFile: CACertificates:[] CARevocationLists:[] Cors:{AllowedOrigins:[] AllowedMethods:[] AllowedHeaders:[] ExposedHeaders:[] AllowCredentials:false Enabled:false MaxAge:0 OptionsPassthrough:false OptionsSuccessStatus:0 AllowPrivateNetwork:false} Cache:{Users:{ExpirationTime:0 MaxSize:50} MimeTypes:{Enabled:true MaxSize:1000 CustomMappings:[]}} acmeDomain:} ProviderConf:{Driver:sqlite Name:sftpgo.db Host: Port:0 Username: Password: SSLMode:0 DisableSNI:false TargetSessionAttrs: RootCert: ClientCert: ClientKey: ConnectionString: SQLTablesPrefix: TrackQuota:2 PoolSize:0 UsersBaseDir:/srv/sftpgo/data Actions:{ExecuteOn:[] ExecuteFor:[] Hook:} ExternalAuthHook: ExternalAuthScope:0 PreLoginHook: PostLoginHook: PostLoginScope:0 CheckPasswordHook: CheckPasswordScope:0 UpdateMode:0 PasswordHashing:{BcryptOptions:{Cost:10} Argon2Options:{Memory:65536 Iterations:1 Parallelism:2} Algo:bcrypt} PasswordValidation:{Admins:{MinEntropy:0} Users:{MinEntropy:0}} PasswordCaching:true DelayedQuotaUpdate:0 CreateDefaultAdmin:false NamingRules:5 IsShared:0 Node:{Host: Port:0 Proto:http} BackupsPath:/srv/sftpgo/backups} HTTPDConfig:{Bindings:[{Address: Port:8080 EnableWebAdmin:true EnableWebClient:true EnableRESTAPI:true EnabledLoginMethods:0 EnableHTTPS:false CertificateFile: CertificateKeyFile: MinTLSVersion:12 ClientAuthType:0 TLSCipherSuites:[] Protocols:[] ProxyAllowed:[] ClientIPProxyHeader: ClientIPHeaderDepth:0 HideLoginURL:0 RenderOpenAPI:true OIDC:{ClientID: ClientSecret: ClientSecretFile: ConfigURL: RedirectBaseURL: UsernameField: RoleField: ImplicitRoles:false Scopes:[openid profile email] CustomFields:[] InsecureSkipSignatureCheck:false Debug:false provider:<nil> verifier:<nil> providerLogoutURL: oauth2Config:<nil>} Security:{Enabled:false AllowedHosts:[192.168.50.214/32 75.82.162.129/32 192.168.50.89/32] AllowedHostsAreRegex:false HostsProxyHeaders:[] HTTPSRedirect:false HTTPSHost: HTTPSProxyHeaders:[] STSSeconds:0 STSIncludeSubdomains:false STSPreload:false ContentTypeNosniff:false ContentSecurityPolicy: PermissionsPolicy: CrossOriginOpenerPolicy: proxyHeaders:[]} Branding:{WebAdmin:{Name:FTP SERVER ShortName:FTP SERVER LogoPath: FaviconPath: DisclaimerName: DisclaimerPath: DefaultCSS:[] ExtraCSS:[]} WebClient:{Name:FTP Vision ShortName:FTP Vision LogoPath:/home/ubuntu/ftp1.jpg FaviconPath:/home/local-storage/sftpgodata/data/test/ftp2.jpg DisclaimerName: DisclaimerPath: DefaultCSS:[] ExtraCSS:[]}} allowHeadersFrom:[]}] TemplatesPath:templates StaticFilesPath:static OpenAPIPath:openapi WebRoot: CertificateFile: CertificateKeyFile: CACertificates:[] CARevocationLists:[] SigningPassphrase: SigningPassphraseFile: TokenValidation:0 MaxUploadFileSize:0 Cors:{AllowedOrigins:[192.168.50.214/32 192.168.50.89/32 75.82.162.129/32] AllowedMethods:[] AllowedHeaders:[] ExposedHeaders:[] AllowCredentials:false Enabled:true MaxAge:0 OptionsPassthrough:false OptionsSuccessStatus:0 AllowPrivateNetwork:false} Setup:{InstallationCode: InstallationCodeHint:Installation code} HideSupportLink:false acmeDomain:} HTTPConfig:{Timeout:20 RetryWaitMin:2 RetryWaitMax:30 RetryMax:3 CACertificates:[] Certificates:[] SkipTLSVerify:false Headers:[] customTransport:<nil>} CommandConfig:{Timeout:30 Env:[] Commands:[]} KMSConfig:{Secrets:{URL: MasterKeyPath: MasterKeyString: masterKey:}} MFAConfig:{TOTP:[{Name:Default Issuer:SFTPGo Algo:sha1 algo:0}]} TelemetryConfig:{BindPort:0 BindAddress:127.0.0.1 EnableProfiler:false AuthUserFile: CertificateFile: CertificateKeyFile: TLSCipherSuites:[] MinTLSVersion:12 Protocols:[]} PluginsConfig:[{Type:ipfilter NotifierOptions:{FsEvents:[] ProviderEvents:[] ProviderObjects:[] LogEvents:[] RetryMaxTime:0 RetryQueueMaxSize:0} KMSOptions:{Scheme: EncryptedStatus:} AuthOptions:{Scope:0} Cmd:/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main Args:[[redacted] [redacted] [redacted] [redacted] [redacted]] SHA256Sum: AutoMTLS:true EnvPrefix: EnvVars:[] kmsID:0}] SMTPConfig:{Host: Port:587 From: User: Password: AuthType:0 Encryption:0 Domain: TemplatesPath:templates Debug:0 OAuth2:{Provider:0 Tenant: ClientID: ClientSecret: RefreshToken: mu:<nil> config:<nil> accessToken:<nil>}}}"}
{"level":"info","time":"2024-09-10T04:15:45.254","sender":"kms","message":"secret provider registered for scheme: \"local\", encrypted status: \"Secretbox\""}
{"level":"info","time":"2024-09-10T04:15:45.254","sender":"kms","message":"secret provider registered for scheme: \"builtin\", encrypted status: \"AES-256-GCM\""}
{"level":"debug","time":"2024-09-10T04:15:45.254","sender":"dataprovider_sqlite","message":"sqlite database handle created, connection string: \"file:sftpgo.db?cache=shared&_foreign_keys=1\""}
{"level":"debug","time":"2024-09-10T04:15:45.257","sender":"dataprovider_sqlite","message":"sql database is up to date, current version: 29"}
{"level":"debug","time":"2024-09-10T04:15:45.258","sender":"dataprovider_sqlite","message":"absolute backup path \"/srv/sftpgo/backups\""}
{"level":"debug","time":"2024-09-10T04:15:45.258","sender":"plugins","message":"initialize"}
{"level":"debug","time":"2024-09-10T04:15:45.258","sender":"plugins","message":"create new IP filter plugin \"/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main\""}
{"level":"debug","time":"2024-09-10T04:15:45.258","sender":"dataprovider_sqlite","message":"delayed quota update loop started, wait time: 0s"}
{"level":"debug","time":"2024-09-10T04:15:45.258","sender":"dataprovider_sqlite","message":"delayed quota update loop ended, wait time: 0s"}
{"level":"debug","time":"2024-09-10T04:15:45.261","sender":"plugins","message":"no match for plugin process /home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main"}
{"level":"debug","time":"2024-09-10T04:15:45.261","sender":"plugins","message":"adding env vars with prefix \"SFTPGO_PLUGIN_GEOIPFILTER_MAIN_\" for plugin \"/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main\""}
{"level":"debug","time":"2024-09-10T04:15:45.261","sender":"plugins","message":"additional env vars for plugin \"/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main\": []"}
{"level":"info","time":"2024-09-10T04:15:45.261","sender":"plugins.ipfilter","message":"configuring client automatic mTLS"}
{"level":"debug","time":"2024-09-10T04:15:45.299","sender":"plugins","message":"unable to get rpc client for plugin \"/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main\": fork/exec /home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main: no such file or directory"}
{"level":"warn","time":"2024-09-10T04:15:45.299","sender":"plugins","message":"unable to create IP filter plugin: fork/exec /home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main: no such file or directory, config {Type:ipfilter NotifierOptions:{FsEvents:[] ProviderEvents:[] ProviderObjects:[] LogEvents:[] RetryMaxTime:0 RetryQueueMaxSize:0} KMSOptions:{Scheme: EncryptedStatus:} AuthOptions:{Scope:0} Cmd:/home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main Args:[serve --db-file /home/local-storage/sftpgohome/GeoLite2-Country.mmdb --allowed-countries IT,US] SHA256Sum: AutoMTLS:true EnvPrefix: EnvVars:[] kmsID:0}"}
{"level":"error","time":"2024-09-10T04:15:45.299","sender":"service","message":"unable to initialize plugin system: fork/exec /home/local-storage/sftpgohome/sftpgo-plugin-geoipfilter-main: no such file or directory"}
{"level":"info","time":"2024-09-10T04:18:13.471","sender":"service","message":"starting SFTPGo 2.6.2-636a1c2c-2024-06-21T17:33:00Z +metrics +azblob +gcs +s3 +bolt +mysql +pgsql +sqlite +unixcrypt +portable, config dir: ., config file: , log max size: 10 log max backups: 5 log max age: 28 log level: debug, log compress: false, log utc time: false, load data from: \"\", grace time: 0 secs"}
{"level":"info","time":"2024-09-10T04:18:13.471","sender":"config","message":"unable to read env files from \"env.d\": open env.d: no such file or directory"}

What are you using SFTPGo for?

Private user, home usecase (home backup/VPS)

Additional info

-

fostermi commented 1 month ago

Files for branding are relative to the static_files_path, so unless you change that as well (and have all the js and html files copied there), logos etc need to go under /usr/share/sftpgo/static/, from my experience.