Start ftp service error

    • Resolved
    • OMV 5.x (development)
    • Start ftp service error

      There is no attempt to run the ftp service. An error appears.

      Error #0:OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run proftpd 2>&1' with exit code '1': debian:---------- ID: configure_proftpd_mod_core Function: file.managed Name: /etc/proftpd/proftpd.conf Result: True Comment: File /etc/proftpd/proftpd.conf updated Started: 11:51:20.178820 Duration: 167.134 ms
    • Please provide more information how we can reproduce this, because i do not see any problems when testing this.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • votdev wrote:

      Please provide more information how we can reproduce this, because i do not see any problems when testing this.
      My OMV 5 system is running the latest git code. To reproduce:

      Enable ftp in ftp settings tab by only checking Enable checkbox.
      Click Save
      Click Apply and get the follow error:

      Difference-File

      1. Error #0:
      2. OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; omv-salt deploy run proftpd 2>&1' with exit code '1': debian:
      3. ----------
      4. ID: configure_proftpd_mod_core
      5. Function: file.managed
      6. Name: /etc/proftpd/proftpd.conf
      7. Result: True
      8. Comment: File /etc/proftpd/proftpd.conf updated
      9. Started: 07:47:05.346871
      10. Duration: 49.205 ms
      11. Changes:
      12. ----------
      13. diff:
      14. ---
      15. +++
      16. @@ -32,55 +32,3 @@
      17. HideFiles (welcome.msg)
      18. </Directory>
      19. -<IfModule mod_auth.c>
      20. - DefaultRoot /srv/ftp
      21. - MaxClients 5
      22. - MaxLoginAttempts 1
      23. - RequireValidShell on
      24. - # This option is useless because this is handled via the PAM
      25. - # pam_listfile.so module, so set it to 'off' by default.
      26. - UseFtpUsers off
      27. -</IfModule>
      28. -<IfModule mod_auth_pam.c>
      29. - AuthPAM on
      30. - AuthPAMConfig proftpd
      31. -</IfModule>
      32. -<IfModule mod_ban.c>
      33. - BanEngine off
      34. - BanControlsACLs all allow user root
      35. - BanLog /var/log/proftpd/ban.log
      36. - BanMessage Host %a has been banned
      37. - BanTable /var/run/proftpd/ban.tab
      38. -</IfModule>
      39. -<IfModule mod_ctrls.c>
      40. - ControlsEngine on
      41. - ControlsMaxClients 2
      42. - ControlsLog /var/log/proftpd/controls.log
      43. - ControlsInterval 5
      44. - ControlsSocket /var/run/proftpd/proftpd.sock
      45. -</IfModule>
      46. -<IfModule mod_ctrls_admin.c>
      47. - AdminControlsEngine off
      48. -</IfModule>
      49. -<IfModule mod_delay.c>
      50. - DelayEngine on
      51. -</IfModule>
      52. -<IfModule mod_facl.c>
      53. - FACLEngine on
      54. -</IfModule>
      55. -<IfModule mod_quotatab.c>
      56. - QuotaEngine off
      57. -</IfModule>
      58. -<IfModule mod_ratio.c>
      59. - Ratios off
      60. -</IfModule>
      61. -LoadModule mod_vroot.c
      62. -<IfModule mod_vroot.c>
      63. - VRootEngine on
      64. - VRootLog /var/log/proftpd/vroot.log
      65. -</IfModule>
      66. -<IfModule mod_wrap.c>
      67. - TCPAccessFiles /etc/hosts.allow /etc/hosts.deny
      68. - TCPAccessSyslogLevels info warn
      69. - TCPServiceName ftpd
      70. -</IfModule>
      71. ----------
      72. ID: configure_proftpd_mod_core_default_login_msg
      73. Function: file.managed
      74. Name: /srv/ftp/welcome.msg
      75. Result: True
      76. Comment: File /srv/ftp/welcome.msg is in the correct state
      77. Started: 07:47:05.396170
      78. Duration: 0.866 ms
      79. Changes:
      80. ----------
      81. ID: prereq_proftpd_mod_tls_certificates
      82. Function: salt.state
      83. Result: True
      84. Comment: States ran successfully. Updating debian.
      85. Started: 07:47:05.397638
      86. Duration: 763.412 ms
      87. Changes:
      88. debian:
      89. ----------
      90. ID: remove_ssl_certificates_crt
      91. Function: module.run
      92. Result: True
      93. Comment: file.find: []
      94. Started: 07:47:05.546503
      95. Duration: 3.365 ms
      96. Changes:
      97. ----------
      98. file.find:
      99. ----------
      100. ID: remove_ssl_certificates_key
      101. Function: module.run
      102. Name: file.find
      103. Result: True
      104. Comment:
      105. Started: 07:47:05.549932
      106. Duration: 0.22 ms
      107. Changes:
      108. ----------
      109. ID: update_ssl_certificates
      110. Function: cmd.run
      111. Name: update-ca-certificates --fresh
      112. Result: True
      113. Comment: Command "update-ca-certificates --fresh" run
      114. Started: 07:47:05.550554
      115. Duration: 607.924 ms
      116. Changes:
      117. ----------
      118. pid:
      119. 910
      120. retcode:
      121. 0
      122. stderr:
      123. stdout:
      124. Clearing symlinks in /etc/ssl/certs...
      125. done.
      126. Updating certificates in /etc/ssl/certs...
      127. 128 added, 0 removed; done.
      128. Running hooks in /etc/ca-certificates/update.d...
      129. done.
      130. ----------
      131. ID: remove_ssh_certificates
      132. Function: module.run
      133. Result: True
      134. Comment: file.find: []
      135. Started: 07:47:06.158648
      136. Duration: 0.933 ms
      137. Changes:
      138. ----------
      139. file.find:
      140. Summary for debian
      141. ------------
      142. Succeeded: 4 (changed=3)
      143. Failed: 0
      144. ------------
      145. Total states run: 4
      146. Total run time: 612.442 ms
      147. ----------
      148. ID: configure_proftpd_mod_tls
      149. Function: file.managed
      150. Name: /etc/proftpd/tls.conf
      151. Result: True
      152. Comment: File /etc/proftpd/tls.conf is in the correct state
      153. Started: 07:47:06.161142
      154. Duration: 21.316 ms
      155. Changes:
      156. ----------
      157. ID: configure_proftpd_mod_auth
      158. Function: file.append
      159. Name: /etc/proftpd/proftpd.conf
      160. Result: True
      161. Comment: Appended 9 lines
      162. Started: 07:47:06.182543
      163. Duration: 16.885 ms
      164. Changes:
      165. ----------
      166. diff:
      167. ---
      168. +++
      169. @@ -32,3 +32,12 @@
      170. HideFiles (welcome.msg)
      171. </Directory>
      172. +<IfModule mod_auth.c>
      173. + DefaultRoot /srv/ftp
      174. + MaxClients 5
      175. + MaxLoginAttempts 1
      176. + RequireValidShell on
      177. + # This option is useless because this is handled via the PAM
      178. + # pam_listfile.so module, so set it to 'off' by default.
      179. + UseFtpUsers off
      180. +</IfModule>
      181. ----------
      182. ID: proftpd_ftpusers_deny_root
      183. Function: file.uncomment
      184. Name: /etc/ftpusers
      185. Result: True
      186. Comment: Pattern already uncommented
      187. Started: 07:47:06.199509
      188. Duration: 0.612 ms
      189. Changes:
      190. ----------
      191. ID: configure_proftpd_mod_auth_pam
      192. Function: file.append
      193. Name: /etc/proftpd/proftpd.conf
      194. Result: True
      195. Comment: Appended 4 lines
      196. Started: 07:47:06.200195
      197. Duration: 1.359 ms
      198. Changes:
      199. ----------
      200. diff:
      201. ---
      202. +++
      203. @@ -41,3 +41,7 @@
      204. # pam_listfile.so module, so set it to 'off' by default.
      205. UseFtpUsers off
      206. </IfModule>
      207. +<IfModule mod_auth_pam.c>
      208. + AuthPAM on
      209. + AuthPAMConfig proftpd
      210. +</IfModule>
      211. ----------
      212. ID: configure_proftpd_mod_ban
      213. Function: file.append
      214. Name: /etc/proftpd/proftpd.conf
      215. Result: True
      216. Comment: Appended 7 lines
      217. Started: 07:47:06.201628
      218. Duration: 16.053 ms
      219. Changes:
      220. ----------
      221. diff:
      222. ---
      223. +++
      224. @@ -45,3 +45,10 @@
      225. AuthPAM on
      226. AuthPAMConfig proftpd
      227. </IfModule>
      228. +<IfModule mod_ban.c>
      229. + BanEngine off
      230. + BanControlsACLs all allow user root
      231. + BanLog /var/log/proftpd/ban.log
      232. + BanMessage Host %a has been banned
      233. + BanTable /var/run/proftpd/ban.tab
      234. +</IfModule>
      235. ----------
      236. ID: configure_proftpd_mod_ctrls
      237. Function: file.append
      238. Name: /etc/proftpd/proftpd.conf
      239. Result: True
      240. Comment: Appended 7 lines
      241. Started: 07:47:06.217763
      242. Duration: 2.428 ms
      243. Changes:
      244. ----------
      245. diff:
      246. ---
      247. +++
      248. @@ -52,3 +52,10 @@
      249. BanMessage Host %a has been banned
      250. BanTable /var/run/proftpd/ban.tab
      251. </IfModule>
      252. +<IfModule mod_ctrls.c>
      253. + ControlsEngine on
      254. + ControlsMaxClients 2
      255. + ControlsLog /var/log/proftpd/controls.log
      256. + ControlsInterval 5
      257. + ControlsSocket /var/run/proftpd/proftpd.sock
      258. +</IfModule>
      259. ----------
      260. ID: configure_proftpd_mod_ctrls_admin
      261. Function: file.append
      262. Name: /etc/proftpd/proftpd.conf
      263. Result: True
      264. Comment: Appended 3 lines
      265. Started: 07:47:06.220269
      266. Duration: 1.342 ms
      267. Changes:
      268. ----------
      269. diff:
      270. ---
      271. +++
      272. @@ -59,3 +59,6 @@
      273. ControlsInterval 5
      274. ControlsSocket /var/run/proftpd/proftpd.sock
      275. </IfModule>
      276. +<IfModule mod_ctrls_admin.c>
      277. + AdminControlsEngine off
      278. +</IfModule>
      279. ----------
      280. ID: configure_proftpd_mod_delay
      281. Function: file.append
      282. Name: /etc/proftpd/proftpd.conf
      283. Result: True
      284. Comment: Appended 3 lines
      285. Started: 07:47:06.221687
      286. Duration: 1.3 ms
      287. Changes:
      288. ----------
      289. diff:
      290. ---
      291. +++
      292. @@ -62,3 +62,6 @@
      293. <IfModule mod_ctrls_admin.c>
      294. AdminControlsEngine off
      295. </IfModule>
      296. +<IfModule mod_delay.c>
      297. + DelayEngine on
      298. +</IfModule>
      299. ----------
      300. ID: configure_proftpd_mod_facl
      301. Function: file.append
      302. Name: /etc/proftpd/proftpd.conf
      303. Result: True
      304. Comment: Appended 3 lines
      305. Started: 07:47:06.223061
      306. Duration: 1.263 ms
      307. Changes:
      308. ----------
      309. diff:
      310. ---
      311. +++
      312. @@ -65,3 +65,6 @@
      313. <IfModule mod_delay.c>
      314. DelayEngine on
      315. </IfModule>
      316. +<IfModule mod_facl.c>
      317. + FACLEngine on
      318. +</IfModule>
      319. ----------
      320. ID: configure_proftpd_mod_quotatab
      321. Function: file.append
      322. Name: /etc/proftpd/proftpd.conf
      323. Result: True
      324. Comment: Appended 3 lines
      325. Started: 07:47:06.224400
      326. Duration: 1.295 ms
      327. Changes:
      328. ----------
      329. diff:
      330. ---
      331. +++
      332. @@ -68,3 +68,6 @@
      333. <IfModule mod_facl.c>
      334. FACLEngine on
      335. </IfModule>
      336. +<IfModule mod_quotatab.c>
      337. + QuotaEngine off
      338. +</IfModule>
      339. ----------
      340. ID: configure_proftpd_mod_ratio
      341. Function: file.append
      342. Name: /etc/proftpd/proftpd.conf
      343. Result: True
      344. Comment: Appended 3 lines
      345. Started: 07:47:06.225770
      346. Duration: 1.295 ms
      347. Changes:
      348. ----------
      349. diff:
      350. ---
      351. +++
      352. @@ -71,3 +71,6 @@
      353. <IfModule mod_quotatab.c>
      354. QuotaEngine off
      355. </IfModule>
      356. +<IfModule mod_ratio.c>
      357. + Ratios off
      358. +</IfModule>
      359. ----------
      360. ID: configure_proftpd_mod_vroot
      361. Function: file.append
      362. Name: /etc/proftpd/proftpd.conf
      363. Result: True
      364. Comment: Appended 5 lines
      365. Started: 07:47:06.227138
      366. Duration: 16.01 ms
      367. Changes:
      368. ----------
      369. diff:
      370. ---
      371. +++
      372. @@ -74,3 +74,8 @@
      373. <IfModule mod_ratio.c>
      374. Ratios off
      375. </IfModule>
      376. +LoadModule mod_vroot.c
      377. +<IfModule mod_vroot.c>
      378. + VRootEngine on
      379. + VRootLog /var/log/proftpd/vroot.log
      380. +</IfModule>
      381. ----------
      382. ID: configure_proftpd_mod_wrap
      383. Function: file.append
      384. Name: /etc/proftpd/proftpd.conf
      385. Result: True
      386. Comment: Appended 5 lines
      387. Started: 07:47:06.243228
      388. Duration: 1.668 ms
      389. Changes:
      390. ----------
      391. diff:
      392. ---
      393. +++
      394. @@ -79,3 +79,8 @@
      395. VRootEngine on
      396. VRootLog /var/log/proftpd/vroot.log
      397. </IfModule>
      398. +<IfModule mod_wrap.c>
      399. + TCPAccessFiles /etc/hosts.allow /etc/hosts.deny
      400. + TCPAccessSyslogLevels info warn
      401. + TCPServiceName ftpd
      402. +</IfModule>
      403. ----------
      404. ID: create_proftpd_hosts_file_-etc-hosts.allow
      405. Function: file.managed
      406. Name: /etc/hosts.allow
      407. Result: True
      408. Comment: File /etc/hosts.allow exists with proper permissions. No changes made.
      409. Started: 07:47:06.244972
      410. Duration: 0.692 ms
      411. Changes:
      412. ----------
      413. ID: create_proftpd_hosts_file_-etc-hosts.deny
      414. Function: file.managed
      415. Name: /etc/hosts.deny
      416. Result: True
      417. Comment: File /etc/hosts.deny exists with proper permissions. No changes made.
      418. Started: 07:47:06.245739
      419. Duration: 0.698 ms
      420. Changes:
      421. ----------
      422. ID: test_proftpd_service_config
      423. Function: cmd.run
      424. Name: proftpd --configtest
      425. Result: True
      426. Comment: Command "proftpd --configtest" run
      427. Started: 07:47:06.246856
      428. Duration: 15.244 ms
      429. Changes:
      430. ----------
      431. pid:
      432. 2234
      433. retcode:
      434. 0
      435. stderr:
      436. stdout:
      437. Checking syntax of configuration file
      438. ----------
      439. ID: start_proftpd_service
      440. Function: service.running
      441. Name: proftpd
      442. Result: False
      443. Comment: Job for proftpd.service failed because the control process exited with error code.
      444. See "systemctl status proftpd.service" and "journalctl -xe" for details.
      445. Started: 07:47:06.756697
      446. Duration: 36.861 ms
      447. Changes:
      448. Summary for debian
      449. -------------
      450. Succeeded: 19 (changed=14)
      451. Failed: 1
      452. -------------
      453. Total states run: 20
      454. Total run time: 949.804 ms/usr/lib/python3/dist-packages/salt/utils/decorators/signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
      455. *salt.utils.args.get_function_argspec(original_function)
      456. /usr/lib/python3/dist-packages/salt/utils/decorators/signature.py:31: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
      457. *salt.utils.args.get_function_argspec(original_function)
      458. in /usr/share/php/openmediavault/system/process.inc:182
      459. Stack trace:
      460. #0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(60): OMV\System\Process->execute()
      461. #1 /usr/share/openmediavault/engined/rpc/config.inc(164): OMV\Engine\Module\ServiceAbstract->deploy()
      462. #2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
      463. #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      464. #4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      465. #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(577): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatussL...', '/tmp/bgoutputgM...')
      466. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      467. #7 /usr/share/openmediavault/engined/rpc/config.inc(186): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      468. #8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
      469. #9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      470. #10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      471. #11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      472. #12 {main}
      Display All
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • proftpd[16533]: Starting ftp server: proftpdstart-stop-daemon: matching on world-writable pidfile /run/proftpd.pid is insecure
      Deleting the PID file seems to fix the problem. After that i do not see that the PID file is recreated, so i assume that the proftpd package has been changed some days ago and the old installed one has a different behaviour.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit
    • votdev wrote:

      Deleting the PID file seems to fix the problem. After that i do not see that the PID file is recreated, so i assume that the proftpd package has been changed some days ago and the old installed one has a different behaviour.
      I can confirm that removing the PID file fixes the issue.
      omv 4.1.22 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Don't know how it happens, but the PID file is only created once after the system has been rebooted and the service is started. After removing and restarting the service via systemctl it will never be created.

      The following commit will ensure that the PID file does not exist, see github.com/openmediavault/open…c8e5eaddfea18c4dd6f7933a8
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit