[SOLVED]unable to remove a shared folder

    • [SOLVED]unable to remove a shared folder

      Hello all,

      I made a mistake trying to set a share folder.

      I've now delete the folder on my folder on my raid1 device.

      The problem is now in the access right management section "shared folder",the folder deleted still there even it don't exist any more.
      I'm unable to remove this folder from the "shared folder"; still "used" and delete button is unreachable.

      I join a screenshot to be clear, NAS is folder to delete and I've only been able to modify the path to lost+found

      I guess there is file to edit or removed.

      If somebody have tips it would be great

      Cheers,



      [IMG:http://i42.tinypic.com/2n7ehxz.jpg]

      The post was edited 2 times, last by Guerito73 ().

    • Re: unaable to remove a shared folder

      Does it say Yes under the Used column? If so, you need to remove all uses of that shared folder before you can delete it.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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!
    • Re: unaable to remove a shared folder

      One addition to ryecoaarons post.
      You need to remove the folder from all services like smb/cifs, nfs, ftp etc.

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: unaable to remove a shared folder

      The process like samba does not know that the folder does no longer exist.
      So check that no service is using it anymore! then you can delete it! And remember to not delete a shared folder from the commandline again!

      Greetings
      David
      "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"

      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


      Upload Logfile via WebGUI/CLI
      #openmediavault on freenode IRC | German & English | GMT+1
      Absolutely no Support via PM!

      I host parts of the omv-extras.org Repository, the OpenMediaVault Live Demo and the pre-built PXE Images. If you want you can take part and help covering the costs by having a look at my profile page.
    • Re: unaable to remove a shared folder

      I'm unable to instal fuser and lsof don't see the folder.

      don't see samba service or something similar, an idea?

      Source Code

      1. F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
      2. 4 S 0 1 0 0 80 0 - 2089 - ? 00:00:01 init
      3. 1 S 0 2 0 0 80 0 - 0 - ? 00:00:00 kthreadd
      4. 1 S 0 3 2 0 -40 - - 0 - ? 00:00:00 migration/0
      5. 1 S 0 4 2 0 80 0 - 0 - ? 00:00:00 ksoftirqd/0
      6. 5 S 0 5 2 0 -40 - - 0 - ? 00:00:00 watchdog/0
      7. 1 S 0 6 2 0 -40 - - 0 - ? 00:00:00 migration/1
      8. 1 S 0 7 2 0 80 0 - 0 - ? 00:00:00 ksoftirqd/1
      9. 5 S 0 8 2 0 -40 - - 0 - ? 00:00:00 watchdog/1
      10. 1 S 0 9 2 0 80 0 - 0 - ? 00:00:00 events/0
      11. 1 S 0 10 2 0 80 0 - 0 - ? 00:00:00 events/1
      12. 1 S 0 11 2 0 80 0 - 0 - ? 00:00:00 cpuset
      13. 1 S 0 12 2 0 80 0 - 0 - ? 00:00:00 khelper
      14. 1 S 0 13 2 0 80 0 - 0 - ? 00:00:00 netns
      15. 1 S 0 14 2 0 80 0 - 0 - ? 00:00:00 async/mgr
      16. 1 S 0 15 2 0 80 0 - 0 - ? 00:00:00 pm
      17. 1 S 0 16 2 0 80 0 - 0 - ? 00:00:00 sync_supers
      18. 1 S 0 17 2 0 80 0 - 0 - ? 00:00:00 bdi-default
      19. 1 S 0 18 2 0 80 0 - 0 - ? 00:00:00 kintegrityd/0
      20. 1 S 0 19 2 0 80 0 - 0 - ? 00:00:00 kintegrityd/1
      21. 1 S 0 20 2 0 80 0 - 0 - ? 00:00:00 kblockd/0
      22. 1 S 0 21 2 0 80 0 - 0 - ? 00:00:00 kblockd/1
      23. 1 S 0 22 2 0 80 0 - 0 - ? 00:00:00 kacpid
      24. 1 S 0 23 2 0 80 0 - 0 - ? 00:00:00 kacpi_notify
      25. 1 S 0 24 2 0 80 0 - 0 - ? 00:00:00 kacpi_hotplug
      26. 1 S 0 25 2 0 80 0 - 0 - ? 00:00:00 kseriod
      27. 1 S 0 28 2 0 80 0 - 0 - ? 00:00:00 kondemand/0
      28. 1 S 0 29 2 0 80 0 - 0 - ? 00:00:00 kondemand/1
      29. 1 S 0 30 2 0 80 0 - 0 - ? 00:00:00 khungtaskd
      30. 1 S 0 31 2 0 80 0 - 0 - ? 00:00:00 kswapd0
      31. 1 S 0 32 2 0 85 5 - 0 - ? 00:00:00 ksmd
      32. 1 S 0 33 2 0 80 0 - 0 - ? 00:00:00 aio/0
      33. 1 S 0 34 2 0 80 0 - 0 - ? 00:00:00 aio/1
      34. 1 S 0 35 2 0 80 0 - 0 - ? 00:00:00 crypto/0
      35. 1 S 0 36 2 0 80 0 - 0 - ? 00:00:00 crypto/1
      36. 1 S 0 263 2 0 80 0 - 0 - ? 00:00:00 ksuspend_usbd
      37. 1 S 0 264 2 0 80 0 - 0 - ? 00:00:00 khubd
      38. 1 S 0 268 2 0 80 0 - 0 - ? 00:00:00 ata/0
      39. 1 S 0 269 2 0 80 0 - 0 - ? 00:00:00 ata/1
      40. 1 S 0 271 2 0 80 0 - 0 - ? 00:00:00 ata_aux
      41. 1 S 0 275 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_0
      42. 1 S 0 276 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_1
      43. 1 S 0 277 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_2
      44. 1 S 0 278 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_3
      45. 1 S 0 279 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_4
      46. 1 S 0 280 2 0 80 0 - 0 - ? 00:00:00 scsi_eh_5
      47. 1 S 0 332 2 0 80 0 - 0 - ? 00:00:00 kstriped
      48. 1 S 0 342 2 0 80 0 - 0 - ? 00:00:00 jbd2/sda1-8
      49. 1 S 0 343 2 0 80 0 - 0 - ? 00:00:00 ext4-dio-unwrit
      50. 1 S 0 344 2 0 80 0 - 0 - ? 00:00:00 ext4-dio-unwrit
      51. 5 S 0 428 1 0 76 -4 - 4229 - ? 00:00:00 udevd
      52. 5 S 0 550 428 0 78 -2 - 4219 - ? 00:00:00 udevd
      53. 5 S 0 551 428 0 78 -2 - 4219 - ? 00:00:00 udevd
      54. 1 S 0 668 2 0 80 0 - 0 - ? 00:00:00 kpsmoused
      55. 1 S 0 676 2 0 80 0 - 0 - ? 00:00:00 flush-8:0
      56. 1 S 0 690 2 0 80 0 - 0 - ? 00:00:00 hd-audio0
      57. 1 S 0 827 2 0 80 0 - 0 - ? 00:00:00 md0_raid1
      58. 1 S 0 894 2 0 80 0 - 0 - ? 00:00:00 jbd2/md0-8
      59. 1 S 0 895 2 0 80 0 - 0 - ? 00:00:00 ext4-dio-unwrit
      60. 1 S 0 896 2 0 80 0 - 0 - ? 00:00:00 ext4-dio-unwrit
      61. 5 S 1 1101 1 0 80 0 - 2024 - ? 00:00:00 portmap
      62. 5 S 103 1114 1 0 80 0 - 3596 - ? 00:00:00 rpc.statd
      63. 5 S 0 1291 1 0 80 0 - 29973 - ? 00:00:00 rsyslogd
      64. 5 S 0 1298 1 0 80 0 - 26498 - ? 00:00:04 monit
      65. 1 S 0 1336 1 0 80 0 - 974 - ? 00:00:00 acpid
      66. 5 S 0 1352 1 0 80 0 - 21496 - ? 00:00:01 apache2
      67. 5 S 33 1356 1352 0 80 0 - 21009 - ? 00:00:00 apache2
      68. 5 S 33 1359 1352 0 80 0 - 21303 - ? 00:00:00 apache2
      69. 5 S 104 1407 1 0 80 0 - 5817 - ? 00:00:00 dbus-daemon
      70. 1 S 0 1436 1 0 80 0 - 50610 - ? 00:00:05 collectd
      71. 1 S 0 1449 1 0 80 0 - 5608 - ? 00:00:00 cron
      72. 1 S 0 1454 2 0 80 0 - 0 - ? 00:00:00 kconservative/0
      73. 1 S 0 1456 1 0 80 0 - 4585 - ? 00:00:00 smartd
      74. 1 S 0 1458 2 0 80 0 - 0 - ? 00:00:00 kconservative/1
      75. 5 S 105 1471 1 0 80 0 - 8472 - ? 00:00:00 avahi-daemon
      76. 1 S 105 1473 1471 0 80 0 - 8441 - ? 00:00:00 avahi-daemon
      77. 5 S 0 1493 1 0 80 0 - 12294 - ? 00:00:00 sshd
      78. 4 S 0 1531 1 0 80 0 - 18751 - ? 00:00:00 cupsd
      79. 5 S 33 1538 1352 0 80 0 - 94572 - ? 00:00:04 apache2
      80. 1 S 112 1628 1 0 80 0 - 23297 - ? 00:00:00 minidlna
      81. 4 S 999 1653 1359 0 80 0 - 20676 - ? 00:00:32 php5
      82. 4 S 999 1654 1359 0 80 0 - 20612 - ? 00:00:35 php5
      83. 5 S 0 1662 1 0 58 - - 983 - ? 00:00:06 watchdog
      84. 0 S 0 1669 1 0 80 0 - 1483 - tty1 00:00:00 getty
      85. 0 S 0 1670 1 0 80 0 - 1483 - tty2 00:00:00 getty
      86. 0 S 0 1671 1 0 80 0 - 1483 - tty3 00:00:00 getty
      87. 0 S 0 1672 1 0 80 0 - 1483 - tty4 00:00:00 getty
      88. 0 S 0 1673 1 0 80 0 - 1483 - tty5 00:00:00 getty
      89. 0 S 0 1674 1 0 80 0 - 1483 - tty6 00:00:00 getty
      90. 4 S 999 2796 1359 0 80 0 - 20872 - ? 00:00:29 php5
      91. 5 S 33 2799 1352 0 80 0 - 126976 - ? 00:00:04 apache2
      92. 5 S 33 28050 1352 0 80 0 - 94323 - ? 00:00:01 apache2
      93. 4 S 0 28597 1493 0 80 0 - 18034 - ? 00:00:00 sshd
      94. 4 S 0 28604 28597 0 80 0 - 4878 - pts/0 00:00:00 bash
      95. 4 R 0 31796 28604 0 80 0 - 1982 - pts/0 00:00:00 ps
      Display All
    • Re: unaable to remove a shared folder

      I promise, never user commandline again to remove a shared folder ;)

      here is the file:

      Source Code

      1. <?xml version="1.0" encoding="UTF-8"?>
      2. <config>
      3. <!-- Configuration version -->
      4. <version>0.1</version>
      5. <!-- System configuration - Do not add any configuration here -->
      6. <system>
      7. <powermanagement>
      8. <cpufreq>1</cpufreq>
      9. <powerbtn>0</powerbtn>
      10. </powermanagement>
      11. <time>
      12. <timezone>Europe/Paris</timezone>
      13. <ntp>
      14. <enable>0</enable>
      15. <timeservers>pool.ntp.org</timeservers>
      16. </ntp>
      17. </time>
      18. <email>
      19. <!--
      20. <enable>0|1</enable>
      21. <tls>0|1</tls>
      22. -->
      23. <enable>0</enable>
      24. <server></server>
      25. <port>25</port>
      26. <tls>0</tls>
      27. <sender></sender>
      28. <authentication>
      29. <!--
      30. <enable>0|1</enable>
      31. -->
      32. <enable>0</enable>
      33. <username></username>
      34. <password></password>
      35. </authentication>
      36. <primaryemail></primaryemail>
      37. <secondaryemail></secondaryemail>
      38. </email>
      39. <certificates>
      40. <!--
      41. <sslcertificate>
      42. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      43. <certificate>xxx</certificate>
      44. <privatekey>xxx</privatekey>
      45. <comment>xxx</comment>
      46. </sslcertificate>
      47. -->
      48. <sslcertificate>
      49. <uuid>fba78d24-c6e0-4617-8bfe-0e6e23ca217c</uuid>
      50. <certificate>-----BEGIN CERTIFICATE-----
      51. MIIG3zCCBMegAwIBAgIJAN1KzQp/FxxiMA0GCSqGSIb3DQEBBQUAMIGlMQswCQYD
      52. VQQGEwJGUjEaMBgGA1UECBMRU2VpbmUgc2FpbnQgZGVuaXMxGDAWBgNVBAcTD1Jv
      53. c255IHNvdXMgYm9pczETMBEGA1UEChMKSGVsbWxpbmdlcjEMMAoGA1UECxMDTkFT
      54. MRAwDgYDVQQDEwdOQVMgT01WMSswKQYJKoZIhvcNAQkBFhxmbG9yaWFuLmhlbG1s
      55. aW5nZXJAZ21haWwuY29tMB4XDTEzMDYyOTEwMDkzNVoXDTIzMDYyNzEwMDkzNVow
      56. gaUxCzAJBgNVBAYTAkZSMRowGAYDVQQIExFTZWluZSBzYWludCBkZW5pczEYMBYG
      57. A1UEBxMPUm9zbnkgc291cyBib2lzMRMwEQYDVQQKEwpIZWxtbGluZ2VyMQwwCgYD
      58. VQQLEwNOQVMxEDAOBgNVBAMTB05BUyBPTVYxKzApBgkqhkiG9w0BCQEWHGZsb3Jp
      59. YW4uaGVsbWxpbmdlckBnbWFpbC5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
      60. ggIKAoICAQDGCXdWnw+4XHf4jtFipMGTfbsMPs2Y3xPUKNMOTp6654vVt6d8PMXO
      61. Ic4pX0Ou06ioC2KgelmXK8+BOeQzRLMXDDht8xhicWgK7zCl5pf1SQ1vtaAAYe6D
      62. 5RiixXoM8Oi51IwkZz3zael89vLWyDshp5sOr8AfoztPJPTzQIh7A9W+mJkmkhqv
      63. 3RPbcDN/TU2awoi6qkgtcmgkflfvUcoy4/0G9fEDtdefHxsH+sXAqHtmntC8ch4k
      64. 6pm/PElsn3oR3Ad9/6Poi5WkdDr2S7INHvwNvgIfaT1tih0c2lWu3Jydk3dICxAg
      65. Kt2/lW8KAU+iDOQpM/bUByeGnP3fC5GX20Mw9VWr+Iw3DFW7iz1vu0hWSjzSeWSa
      66. /qystHSM7siTyvgc9RvqSJWxx/MmRsoQoowWnmn3udPspVWiH2K75cmtYG+GdP9A
      67. J8XgW1PKx3kz0HNChXLuG00XKbEHb6kEq4wHV3CjipwdsAELbnICGoBH2NKhuMGc
      68. JMcah5kZNLQiNgpr8+4chekPLisXmXy7WNuHamTzdcp90HnvWLc9P9l8Jd2teDf9
      69. 6F7dLIB09N91wywwEJsL+jvHoUAtDolJWnlfM0OWESwL8tB/JRZmUeWanz8P+dIp
      70. XB0ap3rEwZRry/xKVL89wzA7CxVliVTySHKnPFWFaJzimSNpxVTmFQIDAQABo4IB
      71. DjCCAQowHQYDVR0OBBYEFONqVLJBkEQL6/IeeaObeUJm62FHMIHaBgNVHSMEgdIw
      72. gc+AFONqVLJBkEQL6/IeeaObeUJm62FHoYGrpIGoMIGlMQswCQYDVQQGEwJGUjEa
      73. MBgGA1UECBMRU2VpbmUgc2FpbnQgZGVuaXMxGDAWBgNVBAcTD1Jvc255IHNvdXMg
      74. Ym9pczETMBEGA1UEChMKSGVsbWxpbmdlcjEMMAoGA1UECxMDTkFTMRAwDgYDVQQD
      75. EwdOQVMgT01WMSswKQYJKoZIhvcNAQkBFhxmbG9yaWFuLmhlbG1saW5nZXJAZ21h
      76. aWwuY29tggkA3UrNCn8XHGIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
      77. AgEAud9ZGo2Z3oYYQUHJaadt70ImZ545wEsWk66uJH7WZ8sZtHwTUNwOINb7f/g5
      78. FR/b0Grwhk33gkSfnaDDBbpI0ezz6tGGYPlQfeCWP25XKhhz4wTv971xNyru3vDL
      79. 1YEAAOD6dxcwSlbB93IHCBh3AJecAJvF/RzqenJpsw8rZNV9geK2Y3Nki3N/CD1X
      80. ZCJjm7vLvlI+8+5rBy8HQl3OEIds+fOGU0JMnJSYTy7qsFsmNYKAyFN+cMv7d4uq
      81. 6K/swn/yqQC7KpJhik2HeK39Wb/kMbBNzeKcld5Mk/7lPFRrNyc+oECp+O44A+A/
      82. lc9+fb3RIYQ6XhT3FzDXJaTC4u4ZXJdGj2/BdVGIUxU6yyLtLwx6wajpSUoymF73
      83. 8oZ09sOZxmxQnHigUib5HlUabDi4rS1B7G/EfgYj4ifLLMVFEUYwgDvA5bwlog9F
      84. bYG5oGPw1ie8deAqgFPJoMVDFF7Uk8bLRUC2c+qxQ9UeSrA01C+HAhrYFBJaqEdq
      85. hYZL1ts07/tH3LmlmzvbK7gtenCaN95FabKCgaqyO3b3j5mswD/q4gz4HZL/n7Cv
      86. NeyOGF9yiCc96SoZEbblXdsDPyhgiEibvlFYyP9ld863wqTH7dgdvThwQL83Sn3E
      87. 9IPcSNvXRc66ZpNVamLzL9pN34xkrUc+wvkO98r68ePkmXw=
      88. -----END CERTIFICATE-----
      89. </certificate>
      90. <privatekey>-----BEGIN RSA PRIVATE KEY-----
      91. MIIJKQIBAAKCAgEAxgl3Vp8PuFx3+I7RYqTBk327DD7NmN8T1CjTDk6euueL1ben
      92. fDzFziHOKV9DrtOoqAtioHpZlyvPgTnkM0SzFww4bfMYYnFoCu8wpeaX9UkNb7Wg
      93. AGHug+UYosV6DPDoudSMJGc982npfPby1sg7IaebDq/AH6M7TyT080CIewPVvpiZ
      94. JpIar90T23Azf01NmsKIuqpILXJoJH5X71HKMuP9BvXxA7XXnx8bB/rFwKh7Zp7Q
      95. vHIeJOqZvzxJbJ96EdwHff+j6IuVpHQ69kuyDR78Db4CH2k9bYodHNpVrtycnZN3
      96. SAsQICrdv5VvCgFPogzkKTP21Acnhpz93wuRl9tDMPVVq/iMNwxVu4s9b7tIVko8
      97. 0nlkmv6srLR0jO7Ik8r4HPUb6kiVscfzJkbKEKKMFp5p97nT7KVVoh9iu+XJrWBv
      98. hnT/QCfF4FtTysd5M9BzQoVy7htNFymxB2+pBKuMB1dwo4qcHbABC25yAhqAR9jS
      99. objBnCTHGoeZGTS0IjYKa/PuHIXpDy4rF5l8u1jbh2pk83XKfdB571i3PT/ZfCXd
      100. rXg3/ehe3SyAdPTfdcMsMBCbC/o7x6FALQ6JSVp5XzNDlhEsC/LQfyUWZlHlmp8/
      101. D/nSKVwdGqd6xMGUa8v8SlS/PcMwOwsVZYlU8khypzxVhWic4pkjacVU5hUCAwEA
      102. AQKCAgBnCr3hgFn5n4N8/TLNlNR0HdOZh4QKqufyWFuY8id9MMV9qlWnOyfhHY3b
      103. 0QmyiccTyPjEb2T2V4Fcx/aJBpH4yA8EhpyFfGSaa+JwMA+ZPS2UlnhuOoaUcjvj
      104. VcUvvpoZNxLETkPZx54Ju6SXRRAfbsorVh8tVw2hHKWnfEiHWXN5/ISToSnpn6qZ
      105. X0QsVNiwUdA68CcmHoU5l9PBXllLKX2ahZWmTJOo49J40G7c082Bk9kgdHBi3P6q
      106. ln/N2Rz29fmgAcgTU63FKAUV6kT2tsyHifooxeWEfXywappypa+H/hbukXMOib9f
      107. 1C02k4AP3Y1KMxOXNzHFxSIDUE2sP6pSVNwhwm1mNpdOaEX0KEgrbaC+CJAAVmQc
      108. JU4Dl8nD8bbbgwvToZf5Bewx+/8MlbAzl6RMudyPB0OEZwztu8IBZBBnQpSKpUTU
      109. FkpP5PmScGRqfrHz/odGj76JgzJnwU0K/l+ISZfw+RFEnEw2rP+0G+sOTp7RY91l
      110. VoEaLULRHWbxEGDuaO3/dvhAi8v+Lo3Vl3tNC4DR/2EKrtyVq+EIv2lO5Bxw9fiY
      111. dpo8M8ggXJTWcizW0328udvFwldMFIKedDezXKNNBcOhLFlNYF1TheO+DZQ8C064
      112. +JVobVAsR0Wo+7dziSkkhW7NJEOWMXpIDFt3Eg4yOHBsnPGWgQKCAQEA6Bf3cb/0
      113. CnJ3HdPQgwU7kgbhcjhlS6+MFDRvv9G94IJ9JXj1X3XcoGMO18UnbFrLoTt5p/kM
      114. +YzSRS9f35goT369j3qQm8DHzV1g1hNmxM/7eOl/T4yZlPTHTVYcEKMAF3+VcKf6
      115. Sn+dIGTd8qtQdBbkhsvUZ/WSMPHFIDwRAGYGkbL6OTMfERvac6cJA4lIEH2NWvgb
      116. brUfdp7X1yPNCM+4jMPQkdO4YhNB3T5xlfLI6f5iBY1oih8xFu7Ak0/4ccDR9pJg
      117. fJ2MbxgIDIVmU7smMsm/+rpuP+MRGucC1iAAHXIKrq45kkDi5h5TSuncR3MbrJu8
      118. m7Gyv63jvN7O+QKCAQEA2m93YWxJ0se8HjZyaE+IhtrJ0DVYx2HPans41LqGdhrg
      119. 1nvIOid9Wv7Q9XxXvRaWrerk6gJ/FGkHjGxwmF4qLdKZxEViSslRB/tNI07RgK7e
      120. uD28lKs+B3n/JjgTcoNeP4KT/ToP2ij5obNwE6iFrZIhI3zFQVLPdxnC6+T/7bLe
      121. WbfhQ3BgVC/KDqFPJf9jG5ffS1O0km+BXRswXwSGV9cCgZKX8SWusv9QXMfkk1pu
      122. aX2o/pECW7AAGK7wHTGzUQ1zz5wKsiVDTDiyy19ZOjv2dN858ew0yuLzPhe6knku
      123. 78d5/D9Tw6czhPGli3AkeFTJdktmn4jty5DP9Hmq/QKCAQA29nYC2hJQ5wqOZbrb
      124. TEHvMvHwuqpCYjAqGMDeDC2LHVvFo/93u9GjqdG6B1ZuspHGfO8yeCg6cL7a430w
      125. 1je1m64IbF4ShHTMjXCBQdb0hMxoteMQU5uLSuxnxByhU/iRmAUryJvdSJtNMJXf
      126. AfLriwBTa7HBbMZSEO890vuzvHWRy3C2WwTgaFgzSzs3Oyt1vEXdZSQZ84qf7L3w
      127. lOnZTFfH/hdGcX0YvLa8Ti1X9UbfIv7TkclP7FMTuzafrDCJv7/5RHDVEfpP1MET
      128. NgQlkAxbuqtcFQpG1t8WH97sFmfwkTE2bMv1dqhFFqli9D7WLMxA9CCWPl62RdfI
      129. wnsBAoIBAQCd6HDD4/WmQ6/xo2inkb9fxbCZLMeGM2YvUu7tkf38SUf6pbdEmyGa
      130. 85T5si73SeoZxjJAHRfjGF5VnFr1OzWAtLtmUMZSzCAhBgFooeUAAuqNBExcqUKJ
      131. Qx85cNZWNTOf8/Sp3hxxmKeFxuMhwvUIWhhMwDkVFRlXvy7TO1PscR8eeriE+Ssa
      132. EQYf92rxTCNIYk0Q9m0WYzeAqFQajHnV7GAqbWAb+yLE0Z81w2exQnGJH0dY6Flt
      133. ENmw/l4krLY1xOTQ07xDtn5lDqPqM36cg5aSPIF2K0yq0tAHNj4w/xv4SRsdSGZ0
      134. jV3IIKyNFb+3oYuWUcHZWLKXM5Ox53a9AoIBAQDkr68d+IaVnnliQOoNlUqi7KlX
      135. JvXs1rtbbXNncHu2WkC+MEmvsKEH9BAU6gsgtNx/slNxfLNE/5wUWL4WsSCwIuSn
      136. L/ph1hHU0pgVQBCYXX1bJjAdiXKb36bnmKDnC9Ckg2ADeooilQYDvyioRzIGCCb5
      137. P4FG2EBwQIEkVOWbToKHpyG2a3xl5egSa/WN7oL6pz7xqWI5kx3L2qruW276PRYm
      138. kDHo2qBqmQqqM3WUvQIAIbsyboTckNQB8bX5A6aYndK9FnPEcw8nYKv4Xioj40Ex
      139. oChqeZzJ32tijSCJKVSO98SjSPJVLT04BKImUeMSE4GH/pv+LFFGmK0v7Ik5
      140. -----END RSA PRIVATE KEY-----
      141. </privatekey>
      142. <comment>/C=FR/ST=Seine saint denis/L=Rosny sous bois/O=Helmlinger/OU=NAS/CN=NAS OMV/emailAddress=florian.helmlinger@gmail.com</comment>
      143. </sslcertificate>
      144. </certificates>
      145. <network>
      146. <hostname>openmediavault</hostname>
      147. <domainname>local</domainname>
      148. <interfaces>
      149. <!--
      150. <iface>
      151. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      152. <devicename>(eth|wlan)\d+</devicename>
      153. <method>dhcp|static|manual</method>
      154. <address>xxx.xxx.xxx.xxx</address>
      155. <netmask>xxx.xxx.xxx.xxx</netmask>
      156. <gateway>xxx.xxx.xxx.xxx</gateway>
      157. <mtu></mtu>
      158. <wol>0|1</wol>
      159. <options></options>
      160. </iface>
      161. <bondiface>
      162. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      163. <devicename>bond\d+</devicename>
      164. <method>dhcp|static|manual</method>
      165. <address>xxx.xxx.xxx.xxx</address>
      166. <netmask>xxx.xxx.xxx.xxx</netmask>
      167. <gateway>xxx.xxx.xxx.xxx</gateway>
      168. <mtu></mtu>
      169. <wol>0|1</wol>
      170. <options></options>
      171. <slaves>((eth|wlan)\d+,)*(eth|wlan)\d+</slaves>
      172. <bondprimary>(eth|wlan)\d+</bondprimary>
      173. <bondmode>0|1|2|3|4|5|6</bondmode>
      174. <bondmiimon>0</bondmiimon>
      175. <bonddowndelay>0</bonddowndelay>
      176. <bondupdelay>0</bondupdelay>
      177. </bondiface>
      178. -->
      179. <iface>
      180. <uuid>c394a16e-b968-11e2-bec8-60a44c3fd8bd</uuid>
      181. <devicename>eth0</devicename>
      182. <method>static</method>
      183. <address>192.168.0.43</address>
      184. <netmask>255.255.255.0</netmask>
      185. <gateway>192.168.0.254</gateway>
      186. <mtu>1500</mtu>
      187. <wol>1</wol>
      188. <options></options>
      189. </iface>
      190. </interfaces>
      191. <hostac>
      192. <allow># /etc/hosts.allow: list of hosts that are allowed to access the system.
      193. # See the manual pages hosts_access(5) and hosts_options(5).
      194. #
      195. # Example: ALL: LOCAL @some_netgroup
      196. # ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
      197. #
      198. # If you're going to protect the portmapper use the name "portmap" for the
      199. # daemon name. Remember that you can only use the keyword "ALL" and IP
      200. # addresses (NOT host or domain names) for the portmapper, as well as for
      201. # rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
      202. # for further information.
      203. #</allow>
      204. <deny># /etc/hosts.deny: list of hosts that are _not_ allowed to access the system.
      205. # See the manual pages hosts_access(5) and hosts_options(5).
      206. #
      207. # Example: ALL: some.host.name, .some.domain
      208. # ALL EXCEPT in.fingerd: other.host.name, .other.domain
      209. #
      210. # If you're going to protect the portmapper use the name "portmap" for the
      211. # daemon name. Remember that you can only use the keyword "ALL" and IP
      212. # addresses (NOT host or domain names) for the portmapper, as well as for
      213. # rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
      214. # for further information.
      215. #
      216. # The PARANOID wildcard matches any host whose name does not match its
      217. # address.
      218. #
      219. # You may wish to enable this to ensure any programs that don't
      220. # validate looked up hostnames still leave understandable logs. In past
      221. # versions of Debian this has been the default.
      222. # ALL: PARANOID</deny>
      223. </hostac>
      224. <dnsnameservers>212.27.40.240 8.8.8.8</dnsnameservers>
      225. <iptables>
      226. <!--
      227. <rule>
      228. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      229. <rulenum>1...x</rulenum>
      230. <chain>INPUT|OUTPUT</chain>
      231. <action>ACCEPT|REJECT|DROP|LOG</action>
      232. <source>[!]?xxx.xxx.xxx.xxx|[!]?xxx.xxx.xxx.xxx/xx|xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy</source>
      233. <sport>xxx|xxx-yyy</sport>
      234. <destination>[!]?xxx.xxx.xxx.xxx|[!]?xxx.xxx.xxx.xxx/xx|xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy</destination>
      235. <dport>xxx|xxx-yyy</dport>
      236. <protocol>[!]?(tcp|udp|icmp)|all</protocol>
      237. <extraoptions>xxx</extraoptions>
      238. <comment>xxx</comment>
      239. </rule>
      240. -->
      241. </iptables>
      242. </network>
      243. <usermanagement>
      244. <homedirectory>
      245. <enable>0</enable>
      246. <sharedfolderref>7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>
      247. </homedirectory>
      248. <users>
      249. <!--
      250. <user>
      251. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      252. <name>xxx</name>
      253. <email>xxx</email>
      254. <disallowusermod>0</disallowusermod>
      255. </user>
      256. -->
      257. <user>
      258. <uuid>f912e9f9-73e5-44fa-953b-9466076e4059</uuid>
      259. <name>myname</name>
      260. <email>myemail@gmail.com</email>
      261. <disallowusermod>0</disallowusermod>
      262. </user>
      263. </users>
      264. <groups>
      265. <!--
      266. <group>
      267. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      268. <name>xxx</name>
      269. <comment>xxx</comment>
      270. </group>
      271. -->
      272. </groups>
      273. </usermanagement>
      274. <crontab>
      275. <!--
      276. <job>
      277. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      278. <enable>0|1</enable>
      279. <sendemail>0|1<sendemail>
      280. <type>reboot|shutdown|userdefined</type>
      281. <comment>xxx</comment>
      282. <minute>[00-59|*]</minute>
      283. <everynminute>0|1</everynminute>
      284. <hour>[00-23|*]</hour>
      285. <everynhour>0|1</everynhour>
      286. <dayofmonth>[01-31|*]</dayofmonth>
      287. <everyndayofmonth>0|1</everyndayofmonth>
      288. <month>[01-12|*]</month>
      289. <dayofweek>[1-7|*]</dayofweek>
      290. <username>xxx</username>
      291. <command>xxx</command>
      292. </job>
      293. -->
      294. </crontab>
      295. <syslog>
      296. <remote>
      297. <!--
      298. <protocol>udp|tcp</protocol>
      299. -->
      300. <enable>0</enable>
      301. <host></host>
      302. <port>514</port>
      303. <protocol>udp</protocol>
      304. </remote>
      305. </syslog>
      306. <storage>
      307. <!--
      308. <hdparm>
      309. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      310. <devicefile>/dev/xxx</devicefile>
      311. <smart>0|1</smart>
      312. <apm>0 = disable|1-255<apm>
      313. <aam>0|128|254</aam>
      314. <spindowntime>0 = disabled|1-254</spindowntime>
      315. <writecache>0|1</writecache>
      316. </hdparm>
      317. -->
      318. <filesystem>
      319. <!--
      320. <quota>
      321. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      322. <fsuuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx|xxxx-xxxx</fsuuid>
      323. <usrquota>
      324. <name>xxx</name>
      325. <bsoftlimit>0</bsoftlimit>
      326. <bhardlimit>xxx</bhardlimit>
      327. <isoftlimit>0</isoftlimit>
      328. <ihardlimit>0</ihardlimit>
      329. </usrquota>
      330. <usrquota>
      331. ...
      332. </usrquota>
      333. <grpquota>
      334. <name>xxx</name>
      335. <bsoftlimit>0</bsoftlimit>
      336. <bhardlimit>xxx</bhardlimit>
      337. <isoftlimit>0</isoftlimit>
      338. <ihardlimit>0</ihardlimit>
      339. </grpquota>
      340. <grpquota>
      341. ...
      342. </grpquota>
      343. </quota>
      344. <quota>
      345. ...
      346. </quota>
      347. -->
      348. </filesystem>
      349. </storage>
      350. <fstab>
      351. <!--
      352. <mntent>
      353. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      354. <fsname>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx|xxxx-xxxx|/dev/xxx</fsname>
      355. <dir>/xxx/yyy/zzz</dir>
      356. <type>ext2|ext3|ext4|xfs|jfs|iso9660|udf</type>
      357. <opts></opts>
      358. <freq>0</freq>
      359. <passno>0|1|2</passno>
      360. </mntent>
      361. -->
      362. <mntent>
      363. <uuid>92678fc5-b070-4919-8e98-4db30f71d260</uuid>
      364. <fsname>939bc22d-2090-4b82-908e-16a2b6c7a348</fsname>
      365. <dir>/media/939bc22d-2090-4b82-908e-16a2b6c7a348</dir>
      366. <type>ext4</type>
      367. <opts>defaults,acl,user_xattr,noexec,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0</opts>
      368. <freq>0</freq>
      369. <passno>2</passno>
      370. </mntent>
      371. </fstab>
      372. <shares>
      373. <!--
      374. <sharedfolder>
      375. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      376. <name>xxx</name>
      377. <mntentref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</mntentref>
      378. <reldirpath>xxx</reldirpath>
      379. <privileges>
      380. <privilege>
      381. <type>user|group</type>
      382. <name>xxx</name>
      383. <perms>0 = no permission|5 = read and execute|7 = read, write and execute</perms>
      384. </privilege>
      385. </privileges>
      386. </sharedfolder>
      387. -->
      388. <sharedfolder>
      389. <uuid>7b1b05f6-cb65-4750-b530-ad380131282d</uuid>
      390. <name>NAS</name>
      391. <comment></comment>
      392. <mntentref>92678fc5-b070-4919-8e98-4db30f71d260</mntentref>
      393. <reldirpath>lost+found/</reldirpath>
      394. <privileges>
      395. <privilege>
      396. <type>user</type>
      397. <name>florian</name>
      398. <perms>7</perms>
      399. </privilege>
      400. </privileges>
      401. </sharedfolder>
      402. </shares>
      403. </system>
      404. <!-- Web administration configuration - Do not add any configuration here -->
      405. <webadmin>
      406. <port>80</port>
      407. <enablessl>1</enablessl>
      408. <sslport>443</sslport>
      409. <forcesslonly>1</forcesslonly>
      410. <sslcertificateref>fba78d24-c6e0-4617-8bfe-0e6e23ca217c</sslcertificateref>
      411. <timeout>10</timeout>
      412. <dnssd>
      413. <enable>1</enable>
      414. <name>%h - Web administration</name>
      415. </dnssd>
      416. </webadmin>
      417. <!-- Plugin configuration area -->
      418. <services>
      419. <ssh>
      420. <enable>1</enable>
      421. <port>22</port>
      422. <extraoptions></extraoptions>
      423. <passwordauthentication>1</passwordauthentication>
      424. <permitrootlogin>1</permitrootlogin>
      425. <tcpforwarding>0</tcpforwarding>
      426. <compression>0</compression>
      427. <dnssd>
      428. <enable>1</enable>
      429. <name>%h - SSH</name>
      430. </dnssd>
      431. </ssh>
      432. <nfs>
      433. <enable>0</enable>
      434. <numproc>8</numproc>
      435. <shares>
      436. <!--
      437. <share>
      438. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      439. <sharedfolderref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sharedfolderref>
      440. <mntentref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</mntentref>
      441. <client>xxx.xxx.xxx.xxx/xx|xxxxxxxxx</client>
      442. <options>xxx,xxx,xxx</options>
      443. <extraoptions></extraoptions>
      444. <comment>xxx</comment>
      445. </share>
      446. -->
      447. </shares>
      448. <dnssd>
      449. <enable>1</enable>
      450. <name>%h - NFS</name>
      451. </dnssd>
      452. </nfs>
      453. <ftp>
      454. <enable>0</enable>
      455. <port>21</port>
      456. <maxclients>5</maxclients>
      457. <maxconnectionsperhost>2</maxconnectionsperhost>
      458. <maxloginattempts>1</maxloginattempts>
      459. <timeoutidle>1200</timeoutidle>
      460. <displaylogin></displaylogin>
      461. <allowforeignaddress>0</allowforeignaddress>
      462. <allowrestart>0</allowrestart>
      463. <identlookups>0</identlookups>
      464. <usereversedns>0</usereversedns>
      465. <rootlogin>0</rootlogin>
      466. <masqueradeaddress></masqueradeaddress>
      467. <dynmasqrefresh>0</dynmasqrefresh>
      468. <usepassiveports>0</usepassiveports>
      469. <minpassiveports>49152</minpassiveports>
      470. <maxpassiveports>65534</maxpassiveports>
      471. <limittransferrate>0</limittransferrate>
      472. <maxuptransferrate>0</maxuptransferrate>
      473. <maxdowntransferrate>0</maxdowntransferrate>
      474. <anonymous>0</anonymous>
      475. <requirevalidshell>1</requirevalidshell>
      476. <extraoptions></extraoptions>
      477. <shares>
      478. <!--
      479. <share>
      480. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      481. <sharedfolderref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sharedfolderref>
      482. <mntentref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</mntentref>
      483. <comment>xxx</comment>
      484. </share>
      485. -->
      486. </shares>
      487. <modules>
      488. <mod_ban>
      489. <!--
      490. <rule>
      491. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      492. <event>AnonRejectPasswords|ClientConnectRate|MaxClientsPerClass|MaxClientsPerHost|MaxClientsPerUser|MaxConnectionsPerHost|MaxHostsPerUser|MaxLoginAttempts|TimeoutIdle|TimeoutNoTransfer</ev$
      493. <occurrence>xxx</occurrence>
      494. <timeinterval>hh:mm:ss</timeinterval>
      495. <expire>hh:mm:ss</expire>
      496. </rule>
      497. -->
      498. </mod_ban>
      499. <mod_tls>
      500. <enable>0</enable>
      501. <required>0</required>
      502. <sslcertificateref></sslcertificateref>
      503. <nocertrequest>0</nocertrequest>
      504. <nosessionreuserequired>0</nosessionreuserequired>
      505. <useimplicitssl>0</useimplicitssl>
      506. <extraoptions></extraoptions>
      507. </mod_tls>
      508. </modules>
      509. <dnssd>
      510. <enable>1</enable>
      511. <name>%h - FTP</name>
      512. </dnssd>
      513. </ftp>
      514. <smart>
      515. <enable>1</enable>
      516. <interval>1800</interval>
      517. <powermode>standby</powermode>
      518. <tempdiff>0</tempdiff>
      519. <tempinfo>0</tempinfo>
      520. <tempcrit>0</tempcrit>
      521. <scheduledtests></scheduledtests>
      522. </smart>
      523. <tftp>
      524. <!--
      525. <blocksize>[512-65464]</blocksize>
      526. <sharedfolderref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sharedfolderref>
      527. -->
      528. <enable>0</enable>
      529. <port>69</port>
      530. <retransmit>1000000</retransmit>
      531. <blocksize>512</blocksize>
      532. <allownewfiles>0</allownewfiles>
      533. <sharedfolderref></sharedfolderref>
      534. <extraoptions></extraoptions>
      535. <dnssd>
      536. <enable>1</enable>
      537. <name>%h - TFTP</name>
      538. </dnssd>
      539. </tftp>
      540. <smb>
      541. <enable>0</enable>
      542. <workgroup>WORKGROUP</workgroup>
      543. <serverstring>%h server</serverstring>
      544. <loglevel>0</loglevel>
      545. <usesendfile>1</usesendfile>
      546. <nullpasswords>1</nullpasswords>
      547. <localmaster>1</localmaster>
      548. <timeserver>0</timeserver>
      549. <winssupport>0</winssupport>
      550. <winsserver></winsserver>
      551. <homesenable>1</homesenable>
      552. <homesbrowseable>1</homesbrowseable>
      553. <extraoptions></extraoptions>
      554. <shares></shares>
      555. <dnssd>
      556. <enable>1</enable>
      557. <name>%h - SMB/CIFS</name>
      558. </dnssd>
      559. </smb>
      560. <rsync>
      561. <server>
      562. <enable>0</enable>
      563. <port>873</port>
      564. <extraoptions></extraoptions>
      565. <modules>
      566. <!--
      567. <module>
      568. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      569. <sharedfolderref>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</sharedfolderref>
      570. <uid>xxx</uid>
      571. <gid>xxx</gid>
      572. <name>xxx</name>
      573. <comment>xxx</comment>
      574. <readonly>0</readonly>
      575. <writeonly>0</writeonly>
      576. <maxconnections>0</maxconnections>
      577. <list>1</list>
      578. <hostsallow></hostsallow>
      579. <hostsdeny></hostsdeny>
      580. <extraoptions></extraoptions>
      581. <authusers>0|1</authusers>
      582. <users>
      583. <user>
      584. <name>xxx</name>
      585. <password>xxx</password>
      586. <user>
      587. <users>
      588. </module>
      589. -->
      590. </modules>
      591. <dnssd>
      592. <enable>1</enable>
      593. <name>%h - Rsync</name>
      594. </dnssd>
      595. </server>
      596. <jobs>
      597. <!--
      598. <job>
      599. <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
      600. <enable>0|1</enable>
      601. <sendemail>0|1<sendemail>
      602. <comment>xxx</comment>
      603. <type>local|remote</type>
      604. <src>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx|xxx</src>
      605. <dest>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx|xxx</dest>
      606. <minute>[00-59|*]</minute>
      607. <everynminute>0|1</everynminute>
      608. <hour>[00-23|*]</hour>
      609. <everynhour>0|1</everynhour>
      610. <dayofmonth>[01-31|*]</dayofmonth>
      611. <everyndayofmonth>0|1</everyndayofmonth>
      612. <month>[01-12|*]</month>
      613. <dayofweek>[1-7|*]</dayofweek>
      614. <recursive>1</recursive>
      615. <times>1</times>
      616. <compress>0</compress>
      617. <archive>1</archive>
      618. <delete>0</delete>
      619. <quiet>0</quiet>
      620. <perms>1</perms>
      621. <acls>1</acls>
      622. <xattrs>0</xattrs>
      623. <dryrun>0</dryrun>
      624. <partial>0</partial>
      625. <extraoptions></extraoptions>
      626. // remote
      627. <mode>push|pull</mode>
      628. <password>xxx</password>
      629. </job>
      630. -->
      631. </jobs>
      632. </rsync>
      633. <snmp>
      634. <!--
      635. <version>2c|3</version>
      636. <securitylevel>noauth|auth|priv</securitylevel>
      637. <authtype>MD5|SHA</authtype>
      638. <privtype>DES|AES</privtype>
      639. -->
      640. <enable>0</enable>
      641. <community>public</community>
      642. <syslocation></syslocation>
      643. <syscontact></syscontact>
      644. <version>2c</version>
      645. <username></username>
      646. <securitylevel>noauth</securitylevel>
      647. <authtype>MD5</authtype>
      648. <authpassphrase></authpassphrase>
      649. <privtype>DES</privtype>
      650. <privpassphrase></privpassphrase>
      651. <extraoptions></extraoptions>
      652. <trap>
      653. <enable>0</enable>
      654. <community>public</community>
      655. <host>localhost</host>
      656. <port>162</port>
      657. </trap>
      658. </snmp>
      659. <transmissionbt>
      660. <enable>0</enable>
      661. <pexenabled>1</pexenabled>
      662. <dhtenabled>1</dhtenabled>
      663. <encryption>1</encryption>
      664. <rpcport>9091</rpcport>
      665. <rpcauthenticationrequired>1</rpcauthenticationrequired>
      666. <rpcusername>admin</rpcusername>
      667. <rpcpassword>openmediavault</rpcpassword>
      668. <blocklistenabled>0</blocklistenabled>
      669. <blocklistsyncenabled>0</blocklistsyncenabled>
      670. <blocklistsyncfrequency>daily</blocklistsyncfrequency>
      671. <blocklisturl>http://update.transmissionbt.com/level1.gz</blocklisturl>
      672. <modules>
      673. <locationsandfiles>
      674. <preallocation>1</preallocation>
      675. <rename-partial-files>1</rename-partial-files>
      676. <start-added-torrents>1</start-added-torrents>
      677. <trash-original-torrent-files>0</trash-original-torrent-files>
      678. <paths>
      679. <download>
      680. <sharedfolderref></sharedfolderref>
      681. <dir></dir>
      682. </download>
      683. <incomplete>
      684. <sharedfolderref></sharedfolderref>
      685. <dir>incomplete</dir>
      686. <enabled>0</enabled>
      687. </incomplete>
      688. <watch>
      689. <sharedfolderref></sharedfolderref>
      690. <dir>watch</dir>
      691. <enabled>0</enabled>
      692. </watch>
      693. </paths>
      694. </locationsandfiles>
      695. <bandwidth>
      696. <speed-limit-down>100</speed-limit-down>
      697. <speed-limit-down-enabled>0</speed-limit-down-enabled>
      698. <speed-limit-up>100</speed-limit-up>
      699. <speed-limit-up-enabled>0</speed-limit-up-enabled>
      700. <upload-slots-per-torrent>14</upload-slots-per-torrent>
      701. <alt-speed-enabled>0</alt-speed-enabled>
      702. <alt-speed-up>50</alt-speed-up>
      703. <alt-speed-down>50</alt-speed-down>
      704. </bandwidth>
      705. <queuing>
      706. <queue-stalled-enabled>1</queue-stalled-enabled>
      707. <queue-stalled-minutes>30</queue-stalled-minutes>
      708. <download-queue-enabled>1</download-queue-enabled>
      709. <download-queue-size>5</download-queue-size>
      710. <seed-queue-enabled>0</seed-queue-enabled>
      711. <seed-queue-size>10</seed-queue-size>
      712. </queuing>
      713. <peer>
      714. <bind-address-ipv4>0.0.0.0</bind-address-ipv4>
      715. <bind-address-ipv6>::</bind-address-ipv6>
      716. <peer-limit-global>240</peer-limit-global>
      717. <peer-limit-per-torrent>60</peer-limit-per-torrent>
      718. <peer-socket-tos>default</peer-socket-tos>
      719. <peer-port>51413</peer-port>
      720. <peer-port-random-high>65535</peer-port-random-high>
      721. <peer-port-random-low>1024</peer-port-random-low>
      722. <peer-port-random-on-start>0</peer-port-random-on-start>
      723. <port-forwarding-enabled>0</port-forwarding-enabled>
      724. </peer>
      725. <scheduling>
      726. <alt-speed-time-enabled>0</alt-speed-time-enabled>
      727. <alt-speed-time-begin>540</alt-speed-time-begin>
      728. <alt-speed-time-end>1020</alt-speed-time-end>
      729. <alt-speed-time-day>127</alt-speed-time-day>
      730. <idle-seeding-limit>30</idle-seeding-limit>
      731. <idle-seeding-limit-enabled>0</idle-seeding-limit-enabled>
      732. <ratio-limit>2.0</ratio-limit>
      733. <ratio-limit-enabled>0</ratio-limit-enabled>
      734. </scheduling>
      735. </modules>
      736. <lazy-bitfield-enabled>1</lazy-bitfield-enabled>
      737. <lpd-enabled>0</lpd-enabled>
      738. <scrape-paused-torrents-enabled>1</scrape-paused-torrents-enabled>
      739. <utp-enabled>1</utp-enabled>
      740. <message-level>2</message-level>
      741. <umask>18</umask>
      742. <rpcurl>/transmission/</rpcurl>
      743. <cache-size-mb>4</cache-size-mb>
      744. <script-torrent-done-enabled>0</script-torrent-done-enabled>
      745. <script-torrent-done-filename></script-torrent-done-filename>
      746. </transmissionbt>
      747. <minidlna>
      748. <enable>0</enable>
      749. <name>MiniDLNA Server on OpenMediaVault</name>
      750. <port>8200</port>
      751. <strict>0</strict>
      752. <tivo>0</tivo>
      753. <folders></folders>
      754. </minidlna>
      755. <cups>
      756. <enable>1</enable>
      757. <airprint>1</airprint>
      758. <enable_samba>1</enable_samba>
      759. <maxjobs>100</maxjobs>
      760. </cups>
      761. </services>
      762. </config>
      Display All
    • Re: unaable to remove a shared folder

      Source Code

      1. <sharedfolder>
      2. <uuid>7b1b05f6-cb65-4750-b530-ad380131282d</uuid>
      3. <name>NAS</name>
      4. <comment></comment>
      5. <mntentref>92678fc5-b070-4919-8e98-4db30f71d260</mntentref>
      6. <reldirpath>lost+found/</reldirpath>
      7. <privileges>
      8. <privilege>
      9. <type>user</type>
      10. <name>florian</name>
      11. <perms>7</perms>
      12. </privilege>
      13. </privileges>
      14. </sharedfolder>
      Display All


      You need to delete the above from your shares section of the config.xml.
    • Re: unaable to remove a shared folder

      Hello again,

      Actually it's not really solved :(, now I'm unable to create new users.

      it says

      Source Code

      1. Erreur #3003:
      2. exception 'OMVException' with message 'Failed to get configuration (xpath=//system/shares/sharedfolder[uuid='7b1b05f6-cb65-4750-b530-ad380131282d'])' in /var/www/openmediavault/rpc/sharemgmt.inc:907
      3. Stack trace:
      4. #0 [internal function]: ShareMgmtRpc->getPath(Array)
      5. #1 /usr/share/php/openmediavault/rpc.inc(265): call_user_func_array(Array, Array)
      6. #2 /var/www/openmediavault/module/usermgmt.inc(73): OMVRpc::exec('ShareMgmt', 'getPath', Array)
      7. #3 [internal function]: OMVUserMgmtModule->addUser(Array)
      8. #4 /usr/share/php/openmediavault/notify.inc(123): call_user_func_array(Array, Array)
      9. #5 /var/www/openmediavault/rpc/usermgmt.inc(521): OMVNotifyDispatcher->notify(2, 'org.openmediava...', Array)
      10. #6 [internal function]: UserMgmtRpc->setUser(Array)
      11. #7 /usr/share/php/openmediavault/rpc.inc(265): call_user_func_array(Array, Array)
      12. #8 /usr/share/php/openmediavault/rpc.inc(98): OMVRpc::exec('UserMgmt', 'setUser', Array)
      13. #9 /var/www/openmediavault/rpc.php(44): OMVJsonRpcServer->handle()
      14. #10 {main}
      Display All


      I guess something is wrong in file sharemgmt.inc

      Source Code

      1. ?php
      2. /**
      3. * This file is part of OpenMediaVault.
      4. *
      5. * @license http://www.gnu.org/licenses/gpl.html GPL Version 3
      6. * @author Volker Theile <volker.theile@openmediavault.org>
      7. * @copyright Copyright (c) 2009-2013 Volker Theile
      8. *
      9. * OpenMediaVault is free software: you can redistribute it and/or modify
      10. * it under the terms of the GNU General Public License as published by
      11. * the Free Software Foundation, either version 3 of the License, or
      12. * any later version.
      13. *
      14. * OpenMediaVault is distributed in the hope that it will be useful,
      15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      17. * GNU General Public License for more details.
      18. *
      19. * You should have received a copy of the GNU General Public License
      20. * along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>.
      21. */
      22. require_once("openmediavault/object.inc");
      23. require_once("openmediavault/config.inc");
      24. require_once("openmediavault/system.inc");
      25. require_once("openmediavault/functions.inc");
      26. require_once("openmediavault/error.inc");
      27. require_once("openmediavault/util.inc");
      28. require_once("openmediavault/rpc.inc");
      29. require_once("openmediavault/notify.inc");
      30. class ShareMgmtRpc extends OMVRpc {
      31. public function __construct() {
      32. $this->methodSchemata = array(
      33. "getList" => array('{
      34. "type":"object",
      35. "properties":{
      36. "start":{"type":"integer"},
      37. "limit":{'.$GLOBALS['OMV_JSONSCHEMA_COUNTFIELD'].'},
      38. "sortfield":{'.$GLOBALS['OMV_JSONSCHEMA_SORTFIELD'].'},
      39. "sortdir":{'.$GLOBALS['OMV_JSONSCHEMA_SORTDIR'].'}
      40. }
      41. }'),
      42. "get" => array('{
      43. "type":"object",
      44. "properties":{
      45. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'}
      46. }
      47. }'),
      48. "set" => array('{
      49. "type":"object",
      50. "properties":{
      51. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID_UNDEFINED'].'},
      52. "name":{'.$GLOBALS['OMV_JSONSCHEMA_SHARENAME'].'},
      53. "reldirpath":{"type":"string"},
      54. "comment":{"type":"string"},
      55. "mntentref":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'},
      56. "mode":{"type":"string","enum":["700","750","755",'.
      57. '"770","775","777"],"optional":true}
      58. }
      59. }'),
      60. "delete" => array('{
      61. "type":"object",
      62. "properties":{
      63. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'},
      64. "recursive":{"type":"boolean"}
      65. }
      66. }'),
      67. "getPath" => array('{
      68. "type":"object",
      69. "properties":{
      70. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'}
      71. }
      72. }'),
      73. "getPrivileges" => array('{
      74. "type":"object",
      75. "properties":{
      76. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'}
      77. }
      78. }'),
      79. "setPrivileges" => array('{
      80. "type":"object",
      81. "properties":{
      82. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'},
      83. "privileges":{
      84. "type":"array",
      85. "items":{
      86. "type":"object",
      87. "properties":{
      88. "name":{"type":"string"},
      89. "perms":{"type":"integer","enum":[0,5,7]},
      90. "type":{"type":"string","enum":["user","group"]}
      91. }
      92. }
      93. }
      94. }
      95. }'),
      96. "getFileACL" => array('{
      97. "type":"object",
      98. "properties":{
      99. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'},
      100. "file":{"type":"string"}
      101. }
      102. }'),
      103. "setFileACL" => array('{
      104. "type":"object",
      105. "properties":{
      106. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'},
      107. "file":{"type":"string"},
      108. "recursive":{"type":"boolean"},
      109. "replace":{"type":"boolean"},
      110. "user":{"type":"integer","enum":[0,1,2,3,4,5,6,7],'.
      111. '"optional":true},
      112. "group":{"type":"integer","enum":[0,1,2,3,4,5,6,7],'.
      113. '"optional":true},
      114. "other":{"type":"integer","enum":[0,1,2,3,4,5,6,7],'.
      115. '"optional":true},
      116. "users":{
      117. "type":"array",
      118. "items":{
      119. "type":"object",
      120. "properties":{
      121. "name":{"type":"string"},
      122. "perms":{"type":"integer","enum":'.
      123. '[0,1,2,3,4,5,6,7]}
      124. }
      125. }
      126. },
      127. "groups":{
      128. "type":"array",
      129. "items":{
      130. "type":"object",
      131. "properties":{
      132. "name":{"type":"string"},
      133. "perms":{"type":"integer","enum":'.
      134. '[0,1,2,3,4,5,6,7]}
      135. }
      136. }
      137. }
      138. }
      139. }'),
      140. "getReferencers" => array('{
      141. "type":"object",
      142. "properties":{
      143. "uuid":{'.$GLOBALS['OMV_JSONSCHEMA_UUID'].'}
      144. }
      145. }')
      146. );
      147. }
      148. /**
      149. * Get list of mount points that can be used for shared folders.
      150. * @return An array containing objects with the following fields:
      151. * \em uuid, \em devicefile and \em description.
      152. * The field \em uuid is the mount point configuration object UUID.
      153. */
      154. public function getCandidates() {
      155. // $this->debug(var_export(func_get_args(), TRUE));
      156. global $xmlConfig;
      157. // Check permissions
      158. $this->validateSession();
      159. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      160. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      161. }
      162. $this->commitSession();
      163. // Get list of mount points, except bind mounts.
      164. $xpath = "//system/fstab/mntent[not(contains(opts,'bind'))]";
      165. $objects = $xmlConfig->getList($xpath);
      166. if (is_null($objects)) {
      167. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      168. $xpath);
      169. }
      170. // Get the filesystem details for each mount point.
      171. $result = array();
      172. foreach ($objects as $objectk => $objectv) {
      173. $fs = new OMVFilesystem($objectv['fsname']);
      174. if (!$fs->exists()) {
      175. // throw new OMVException(OMVErrorMsg::E_MISC_FAILURE,
      176. // sprintf(gettext("Filesystem '%s' not found"),
      177. // $objectv['fsname']));
      178. continue;
      179. }
      180. // Skip the filesystems that are not mounted at the moment.
      181. if (FALSE === $fs->isMounted())
      182. continue;
      183. // Get some filesystem details.
      184. $devicefile = $fs->getDeviceFile();
      185. $label = $fs->getLabel();
      186. // Prepare result object.
      187. $object = array(
      188. "uuid" => $objectv['uuid'],
      189. "devicefile" => $devicefile,
      190. "description" => !empty($label) ? $label : $devicefile
      191. );
      192. // Get some more filesystem details if possible.
      193. if (FALSE !== ($fsStats = $fs->getStatistics())) {
      194. $object['description'] = sprintf(
      195. gettext("%s (%s available)"), $object['description'],
      196. binary_format($fsStats['available']));
      197. }
      198. $result[] = $object;
      199. }
      200. return $result;
      201. }
      202. /**
      203. * Enumerate all shared folder configuration objects.
      204. */
      205. public function enumerateSharedFolders() {
      206. // $this->debug(var_export(func_get_args(), TRUE));
      207. global $xmlConfig;
      208. // Check permissions
      209. $this->validateSession();
      210. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      211. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      212. }
      213. $this->commitSession();
      214. // Get configuration object
      215. $xpath = "//system/shares/sharedfolder";
      216. $objects = $xmlConfig->getList($xpath);
      217. if (is_null($objects)) {
      218. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      219. $xpath);
      220. }
      221. // Add additional informations.
      222. foreach ($objects as $objectk => &$objectv) {
      223. $objectv['_used'] = false;
      224. $objectv['description'] = $objectv['name'];
      225. $objectv['mntent'] = array(
      226. "devicefile" => NULL,
      227. "fsname" => NULL,
      228. "dir" => NULL,
      229. "type" => NULL,
      230. "posixacl" => NULL
      231. );
      232. // Get the mount point configuration object to append additional
      233. // informations to the returned objects, e.g. the devicefile or
      234. // a modified description.
      235. $xpath = sprintf("//system/fstab/mntent[uuid='%s']",
      236. $objectv['mntentref']);
      237. $meobject = $xmlConfig->get($xpath);
      238. if (!is_null($meobject) && !empty($meobject)) {
      239. // Add mount point informations.
      240. $objectv['mntent'] = array(
      241. "fsname" => $meobject['fsname'],
      242. "dir" => $meobject['dir'],
      243. "type" => $meobject['type']
      244. );
      245. $fs = new OMVFilesystem($meobject['fsname']);
      246. if (TRUE === $fs->exists()) {
      247. $devicefile = $fs->getDeviceFile();
      248. $label = $fs->getLabel();
      249. // Add some filesystem details.
      250. $objectv['mntent'] = array_merge($objectv['mntent'],
      251. array(
      252. "devicefile" => $devicefile,
      253. "posixacl" => $fs->hasPosixAclSupport()
      254. ));
      255. // Override default values.
      256. $objectv['volume'] = !empty($label) ? $label : $devicefile;
      257. $objectv['description'] = sprintf(
      258. gettext("%s [on %s]"), $objectv['description'],
      259. $objectv['volume']);
      260. }
      261. }
      262. // Is the shared folder referenced by any object?
      263. if (TRUE === $xmlConfig->exists("//sharedfolderref[" .
      264. "contains(.,'{$objectv['uuid']}')]")) {
      265. $objectv['_used'] = true;
      266. }
      267. }
      268. return $objects;
      269. }
      270. /**
      271. * Get list of shared folder configuration objects.
      272. * @param data An array containing the following fields:
      273. * \em start The index where to start.
      274. * \em limit The number of objects to process.
      275. * \em sortfield The name of the column used to sort.
      276. * \em sortdir The sort direction, ASC or DESC.
      277. * @return An array containing the requested objects. The field \em total
      278. * contains the total number of objects, \em data contains the object
      279. * array. An exception will be thrown in case of an error.
      280. */
      281. public function getList($data) {
      282. // $this->debug(var_export(func_get_args(), TRUE));
      283. global $xmlConfig;
      284. // Check permissions
      285. $this->validateSession();
      286. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      287. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      288. }
      289. $this->commitSession();
      290. // Validate method parameters
      291. $this->validateParams(__METHOD__, func_get_args());
      292. // Enumerate all shared folders.
      293. $objects = OMVRpc::exec("ShareMgmt", "enumerateSharedFolders");
      294. // Filter result
      295. return $this->applyFilter($objects, $data['start'], $data['limit'],
      296. $data['sortfield'], $data['sortdir']);
      297. }
      298. /**
      299. * Get a shared folder configuration object.
      300. * @param data An array containing the following fields:
      301. * \em uuid The UUID of the configuration object.
      302. * @return The requested configuration object. The field \em mountpoint
      303. * is the directory where the corresponding filesystem is mounted.
      304. */
      305. public function get($data) {
      306. // $this->debug(var_export(func_get_args(), TRUE));
      307. global $xmlConfig;
      308. // Check permissions
      309. $this->validateSession();
      310. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      311. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      312. }
      313. $this->commitSession();
      314. // Validate method parameters
      315. $this->validateParams(__METHOD__, func_get_args());
      316. // Get configuration object
      317. $xpath = sprintf("//system/shares/sharedfolder[uuid='%s']",
      318. $data['uuid']);
      319. $object = $xmlConfig->get($xpath);
      320. if (is_null($object)) {
      321. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      322. $xpath);
      323. }
      324. // Get the mount point configuration object.
      325. $xpath = sprintf("//system/fstab/mntent[uuid='%s']",
      326. $object['mntentref']);
      327. $meobject = $xmlConfig->get($xpath);
      328. if (is_null($meobject)) {
      329. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      330. $xpath);
      331. }
      332. $object['mountpoint'] = $meobject['dir'];
      333. return $object;
      334. }
      335. /**
      336. * Set (add/update) a shared folder config object.
      337. * @param data An array containing the following fields:
      338. * \em uuid The UUID of the shared folder object.
      339. * \em name The name of the shared folder.
      340. * \em reldirpath The relative directory path.
      341. * \em comment The comment.
      342. * \em mntentref The UUID of the mount point configuration object wherein
      343. * the shared folder is located.
      344. * \em mode The file mode of the shared folder directory. This field
      345. * is optional.
      346. */
      347. public function set($data) {
      348. // $this->debug(var_export(func_get_args(), TRUE));
      349. global $xmlConfig;
      350. // Check permissions
      351. $this->validateSession();
      352. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      353. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      354. }
      355. $this->commitSession();
      356. // Validate method parameters
      357. $this->validateParams(__METHOD__, func_get_args());
      358. // The field 'reldirpath' may not contain the characters '..'. This
      359. // is because of security reasons: the given canonicalized absolute
      360. // path MUST be below the given mount point.
      361. if (1 == preg_match("/\.\./", $data['reldirpath'])) {
      362. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PARAM,
      363. sprintf(gettext("The field '%s' contains forbidden ".
      364. "two-dot symbols"), "reldirpath"));
      365. }
      366. // Prepare configuration data. Use the name of the shared folder
      367. // as the relative directory name of the share.
      368. $object = array(
      369. "uuid" => ($data['uuid'] == $GLOBALS['OMV_UUID_UNDEFINED']) ?
      370. OMVUtil::uuid() : $data['uuid'],
      371. "name" => $data['name'],
      372. "comment" => $data['comment'],
      373. "mntentref" => $data['mntentref'],
      374. "reldirpath" => $data['reldirpath']
      375. );
      376. // Set configuration data
      377. $success = FALSE;
      378. if ($data['uuid'] == $GLOBALS['OMV_UUID_UNDEFINED']) {
      379. // Check uniqueness. The share name must be global unique because
      380. // the name is also used when exporting a shared folder via NFS for
      381. // example.
      382. $xpath = sprintf("//system/shares/sharedfolder[name='%s']",
      383. $data['name']);
      384. if (TRUE === $xmlConfig->exists($xpath)) {
      385. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_UNIQUENESS,
      386. gettext("A shared folder with the given name already exists"));
      387. }
      388. // Add empty list of privileges per default
      389. $object['privileges'] = array();
      390. // Append object to configuration
      391. $success = $xmlConfig->set("//system/shares",
      392. array("sharedfolder" => $object));
      393. } else {
      394. // Get existing configuration object
      395. $xpath = "//system/shares/sharedfolder[uuid='{$data['uuid']}']";
      396. $oldObject = $xmlConfig->get($xpath);
      397. if (is_null($oldObject)) {
      398. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      399. $xpath);
      400. }
      401. // Add existing privileges
      402. $object['privileges'] = $oldObject['privileges'];
      403. // Update existing configuration object
      404. $success = $xmlConfig->replace($xpath, $object);
      405. }
      406. if (FALSE === $success) {
      407. throw new OMVException(OMVErrorMsg::E_CONFIG_SET_OBJECT_FAILED);
      408. }
      409. // Save configuration
      410. if (FALSE === $xmlConfig->save()) {
      411. throw new OMVException(OMVErrorMsg::E_CONFIG_SAVE_FAILED,
      412. $xmlConfig->getError());
      413. }
      414. // Append the file mode field to the notification object if set.
      415. if (array_key_exists("mode", $data)) {
      416. $object['mode'] = $data['mode'];
      417. }
      418. // Notify configuration changes
      419. $dispatcher = &OMVNotifyDispatcher::getInstance();
      420. $dispatcher->notify(($data['uuid'] == $GLOBALS['OMV_UUID_UNDEFINED']) ?
      421. OMV_NOTIFY_CREATE : OMV_NOTIFY_MODIFY,
      422. "org.openmediavault.system.shares.sharedfolder", $object);
      423. }
      424. /**
      425. * Delete a shared folder configuration object.
      426. * @param data An array containing the following fields:
      427. * \em uuid The UUID of the configuration object.
      428. * \em recursive Remove the shared folder and its content recursively.
      429. * @return None
      430. */
      431. function delete($data) {
      432. // $this->debug(var_export(func_get_args(), TRUE));
      433. global $xmlConfig;
      434. // Check permissions
      435. $this->validateSession();
      436. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      437. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      438. }
      439. $this->commitSession();
      440. // Validate method parameters
      441. $this->validateParams(__METHOD__, func_get_args());
      442. // Check if the shared folder is used somewhere
      443. $xpath = sprintf("//sharedfolderref[contains(.,'%s')]", $data['uuid']);
      444. if (TRUE === $xmlConfig->exists($xpath)) {
      445. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_INUSE);
      446. }
      447. // Get the configuration object
      448. $xpath = sprintf("//system/shares/sharedfolder[uuid='%s']",
      449. $data['uuid']);
      450. $object = $xmlConfig->get($xpath);
      451. if (is_null($object)) {
      452. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      453. $xpath);
      454. }
      455. // Delete shared folder content recursively?
      456. $recursive = boolval($data['recursive']);
      457. // Notify configuration changes
      458. $dispatcher = &OMVNotifyDispatcher::getInstance();
      459. $dispatcher->notify(OMV_NOTIFY_PREDELETE,
      460. "org.openmediavault.system.shares.sharedfolder", $object,
      461. $recursive);
      462. // Delete configuration object
      463. if (FALSE === ($object = $xmlConfig->delete($xpath))) {
      464. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_NOT_FOUND,
      465. $xpath);
      466. }
      467. // Save configuration
      468. if (FALSE === $xmlConfig->save()) {
      469. throw new OMVException(OMVErrorMsg::E_CONFIG_SAVE_FAILED,
      470. $xmlConfig->getError());
      471. }
      472. // Notify configuration changes
      473. $dispatcher->notify(OMV_NOTIFY_DELETE,
      474. "org.openmediavault.system.shares.sharedfolder", $object,
      475. $recursive);
      476. }
      477. /**
      478. * Get the shared folder privileges.
      479. * @param data An array containing the following fields:
      480. * \em uuid The UUID of the shared folder configuration object.
      481. * @return An array containing the requested privileges.
      482. */
      483. public function getPrivileges($data) {
      484. // $this->debug(var_export(func_get_args(), TRUE));
      485. global $xmlConfig;
      486. // Check permissions
      487. $this->validateSession();
      488. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      489. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      490. }
      491. $this->commitSession();
      492. // Validate method parameters
      493. $this->validateParams(__METHOD__, func_get_args());
      494. // Get shared folder privileges configuration object
      495. $xpath = sprintf("//system/shares/sharedfolder[uuid='%s']",
      496. $data['uuid']);
      497. $object = $xmlConfig->get($xpath);
      498. if (is_null($object)) {
      499. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      500. $xpath);
      501. }
      502. // Prepare result object.
      503. $result = array();
      504. // Process non-system users.
      505. $users = OMVRpc::exec("UserMgmt", "enumerateUsers");
      506. foreach ($users as $userk => $userv) {
      507. $privilege = array(
      508. "type" => "user",
      509. "name" => $userv['name'],
      510. "perms" => NULL
      511. );
      512. // Check if there are any configured privileges for the given user
      513. if (!empty($object['privileges']['privilege'])) {
      514. foreach ($object['privileges']['privilege'] as $objectv) {
      515. if (($objectv['type'] === $privilege['type']) &&
      516. ($objectv['name'] === $privilege['name'])) {
      517. $privilege['perms'] = intval($objectv['perms']);
      518. break;
      519. }
      520. }
      521. }
      522. $result[] = $privilege;
      523. }
      524. // Process non-system groups.
      525. $groups = OMVRpc::exec("UserMgmt", "enumerateGroups");
      526. foreach ($groups as $groupk => $groupv) {
      527. $privilege = array(
      528. "type" => "group",
      529. "name" => $groupv['name'],
      530. "perms" => NULL
      531. );
      532. // Check if there are any configured privileges for the given user
      533. if (!empty($object['privileges']['privilege'])) {
      534. foreach ($object['privileges']['privilege'] as $objectv) {
      535. if (($objectv['type'] === $privilege['type']) &&
      536. ($objectv['name'] === $privilege['name'])) {
      537. $privilege['perms'] = intval($objectv['perms']);
      538. break;
      539. }
      540. }
      541. }
      542. $result[] = $privilege;
      543. }
      544. return $result;
      545. }
      546. /**
      547. * Set the shared folder privileges.
      548. * @param data An array containing the fields \em uuid and \em privileges.
      549. * \em uuid is the UUID of the shared folder and \em privileges an array
      550. * of privileges to set.
      551. */
      552. public function setPrivileges($data) {
      553. // $this->debug(var_export(func_get_args(), TRUE));
      554. global $xmlConfig;
      555. // Check permissions
      556. $this->validateSession();
      557. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      558. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      559. }
      560. $this->commitSession();
      561. // Validate method parameters
      562. $this->validateParams(__METHOD__, func_get_args());
      563. // Get shared folder configuration object
      564. $xpath = "//system/shares/sharedfolder[uuid='{$data['uuid']}']";
      565. $object = $xmlConfig->get($xpath);
      566. if (is_null($object)) {
      567. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      568. $xpath);
      569. }
      570. // Reset the shared folders privileges.
      571. $object['privileges'] = array();
      572. // Prepare the shared folders privileges.
      573. foreach ($data['privileges'] as $datak => $datav) {
      574. // Skip entries with perms = NULL. It seems they are not detected
      575. // by the JSON schema validation.
      576. if (is_null($datav['perms']))
      577. continue;
      578. // Do some checks ...
      579. switch ($datav['type']) {
      580. case "user":
      581. // Check if user exists
      582. $user = new OMVSystemUser($datav['name']);
      583. if (!$user->exists()) {
      584. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_INVALID,
      585. sprintf(gettext("The user '%s' does not exist"),
      586. $user->getName()));
      587. }
      588. // Is user allowed? It does not make sense to give the WebGUI
      589. // administrator permissions for a shared folder.
      590. if (in_array($user->getName(), array("admin"))) {
      591. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_INVALID,
      592. sprintf(gettext("The user '%s' is not allowed"),
      593. $user->getName()));
      594. }
      595. break;
      596. case "group":
      597. // Check if group exists
      598. $group = new OMVSystemGroup($datav['name']);
      599. if (!$group->exists()) {
      600. throw new OMVException(OMVErrorMsg::E_CONFIG_OBJECT_INVALID,
      601. sprintf(gettext("The group '%s' does not exist"),
      602. $group->getName()));
      603. }
      604. break;
      605. }
      606. // Finally add privilege to shared folder privileges.
      607. $object['privileges']['privilege'][] = array(
      608. "type" => $datav['type'],
      609. "name" => $datav['name'],
      610. "perms" => $datav['perms']
      611. );
      612. }
      613. // Update existing configuration object.
      614. $xpath = "//system/shares/sharedfolder[uuid='{$data['uuid']}']";
      615. if (FALSE === $xmlConfig->replace($xpath, $object)) {
      616. throw new OMVException(OMVErrorMsg::E_CONFIG_SET_OBJECT_FAILED);
      617. }
      618. // Save configuration.
      619. if (FALSE === $xmlConfig->save()) {
      620. throw new OMVException(OMVErrorMsg::E_CONFIG_SAVE_FAILED,
      621. $xmlConfig->getError());
      622. }
      623. // Notify configuration changes.
      624. $dispatcher = &OMVNotifyDispatcher::getInstance();
      625. $dispatcher->notify(OMV_NOTIFY_MODIFY,
      626. "org.openmediavault.system.shares.sharedfolder.privileges", $object);
      627. }
      628. /**
      629. * Get the file access control lists.
      630. * @param data An array containing the following fields:
      631. * \em uuid The UUID of the shared folder object.
      632. * \em file The relative path to the file.
      633. * @return An object containing the fields \em file, \em owner, \em group
      634. * and the object \em acl with the fields \em user, \em group and
      635. * \em other. The fields \em users and \em groups contain the fields
      636. * \em name, \em uid or \em gid, \em system and \em perms.
      637. */
      638. public function getFileACL($data) {
      639. // $this->debug(var_export(func_get_args(), TRUE));
      640. global $xmlConfig;
      641. // Check permissions
      642. $this->validateSession();
      643. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      644. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      645. }
      646. $this->commitSession();
      647. // Validate method parameters
      648. $this->validateParams(__METHOD__, func_get_args());
      649. // The field 'file' may not contain the characters '..'.
      650. if (1 == preg_match("/\.\./", $data['file'])) {
      651. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PARAM,
      652. sprintf(gettext("The field '%s' contains forbidden ".
      653. "two-dot symbols"), "file"));
      654. }
      655. // Get the absolute shared folder path.
      656. $sfpath = OMVRpc::exec("ShareMgmt", "getPath", array(
      657. "uuid" => $data['uuid']));
      658. // Execute command to get the file access control lists.
      659. $cmd = sprintf("export LANG=C; sudo getfacl --no-effective ".
      660. "--access %s 2>&1", escapeshellarg(sprintf("%s/%s", $sfpath,
      661. $data['file'])));
      662. OMVUtil::exec($cmd, $output, $result);
      663. if ($result !== 0) {
      664. throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,
      665. $cmd, implode("\n", $output));
      666. }
      667. // Prepare result object.
      668. $result = array(
      669. "file" => NULL,
      670. "owner" => NULL,
      671. "group" => NULL,
      672. "acl" => array(
      673. "user" => NULL,
      674. "group" => NULL,
      675. "other" => NULL,
      676. "users" => array(),
      677. "groups" => array()
      678. )
      679. );
      680. // Parse the command output:
      681. // # file: test
      682. // # owner: root
      683. // # group: users
      684. // user::rwx
      685. // user:test:rwx
      686. // user:nobody:rwx
      687. // group::rwx
      688. // group:users:rwx
      689. // mask::rwx
      690. // other::r--
      691. $object = array();
      692. // Get the owner and owning group.
      693. foreach ($output as $outputk => $outputv) {
      694. $regex = '/^# (file|owner|group): (.+)$/';
      695. if (1 !== preg_match($regex, $outputv, $matches))
      696. continue;
      697. $result[$matches[1]] = $matches[2];
      698. }
      699. // Get the user, group and other file mode permission bits.
      700. foreach ($output as $outputk => $outputv) {
      701. $regex = '/^(user|group|other):(.*):(.+)$/';
      702. if (1 !== preg_match($regex, $outputv, $matches))
      703. continue;
      704. // Convert permissions string into a number
      705. $perms = 0;
      706. $map = array("r" => 4, "w" => "2", "x" => 1, "-" => 0);
      707. foreach (str_split($matches[3]) as $permk => $permv) {
      708. if (!array_key_exists($permv, $map))
      709. continue;
      710. $perms += $map[$permv];
      711. }
      712. if (!empty($matches[2])) {
      713. $result['acl']["{$matches[1]}s"][] = array(
      714. // Convert special characters, e.g.
      715. // group:Domain\040Computers:---
      716. "name" => str_replace('\040', ' ', $matches[2]),
      717. "perms" => $perms
      718. );
      719. } else {
      720. $result['acl'][$matches[1]] = $perms;
      721. }
      722. }
      723. // Add missing users.
      724. $users = OMVRpc::exec("UserMgmt", "enumerateAllUsers");
      725. foreach ($users as $userk => $userv) {
      726. $found = FALSE;
      727. foreach ($result['acl']['users'] as &$resultv) {
      728. if ($resultv['name'] === $userv['name']) {
      729. // Append additional user details, e.g. uid and the
      730. // information if it is a system user.
      731. $resultv = array_merge($resultv, array(
      732. "uid" => $userv['uid'],
      733. "system" => $userv['system']
      734. ));
      735. $found = TRUE;
      736. break;
      737. }
      738. }
      739. if (TRUE === $found)
      740. continue;
      741. $result['acl']['users'][] = array(
      742. "name" => $userv['name'],
      743. "perms" => NULL,
      744. "uid" => $userv['uid'],
      745. "system" => $userv['system']
      746. );
      747. }
      748. // Add missing groups.
      749. $groups = OMVRpc::exec("UserMgmt", "enumerateAllGroups");
      750. foreach ($groups as $groupk => $groupv) {
      751. $found = FALSE;
      752. foreach ($result['acl']['groups'] as &$resultv) {
      753. if ($resultv['name'] === $groupv['name']) {
      754. // Append additional group details, e.g. gid and the
      755. // information if it is a system group.
      756. $resultv = array_merge($resultv, array(
      757. "gid" => $groupv['gid'],
      758. "system" => $groupv['system']
      759. ));
      760. $found = TRUE;
      761. break;
      762. }
      763. }
      764. if (TRUE === $found)
      765. continue;
      766. $result['acl']['groups'][] = array(
      767. "name" => $groupv['name'],
      768. "perms" => NULL,
      769. "gid" => $groupv['gid'],
      770. "system" => $groupv['system']
      771. );
      772. }
      773. return $result;
      774. }
      775. /**
      776. * Set the local directory access control lists.
      777. * @param data An array containing the following fields:
      778. * \em uuid The UUID of the shared folder object.
      779. * \em file The relative path to the file.
      780. * \em recursive Apply operations to all files and directories
      781. * \em replace Replace all permissions.
      782. * recursively.
      783. * \em user The owner permissions as octal digit. This field is
      784. * optional.
      785. * \em group The group permissions as octal digit. This field is
      786. * optional.
      787. * \em other The other permissions as octal digit. This field is
      788. * optional.
      789. * \em users An array of arrays with the following fiels:
      790. * \em name The user name.
      791. * \em perms The permissions as octal digit.
      792. * \em groups An array of arrays with the following fiels:
      793. * \em name The group name.
      794. * \em perms The permissions as octal digit.
      795. * @return The process ID of the 'setfacl' command.
      796. */
      797. public function setFileACL($data) {
      798. // $this->debug(var_export(func_get_args(), TRUE));
      799. global $xmlConfig;
      800. // Check permissions
      801. $this->validateSession();
      802. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      803. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      804. }
      805. // Note, do not commit the session because the PID of the
      806. // started process will be stored there.
      807. //$this->commitSession();
      808. // Validate method parameters
      809. $this->validateParams(__METHOD__, func_get_args());
      810. // The field 'file' may not contain the characters '..'.
      811. if (1 == preg_match("/\.\./", $data['file'])) {
      812. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PARAM,
      813. sprintf(gettext("The field '%s' contains forbidden ".
      814. "two-dot symbols"), "file"));
      815. }
      816. // Get the absolute shared folder path.
      817. $sfpath = OMVRpc::exec("ShareMgmt", "getPath", array(
      818. "uuid" => $data['uuid']));
      819. // Build the ACL specifications.
      820. $aclspec = array();
      821. // Set permissions of a named users and groups.
      822. foreach (array("user", "group") as $typek => $typev) {
      823. foreach ($data["{$typev}s"] as $entryk => $entryv) {
      824. $aclspec[] = sprintf("default:%s:%s:%d,%s:%s:%d", $typev,
      825. $entryv['name'], $entryv['perms'], $typev,
      826. $entryv['name'], $entryv['perms']);
      827. }
      828. }
      829. // Set owner permissions.
      830. if (array_key_exists("user", $data)) {
      831. $aclspec[] = sprintf("default:user::%s,user::%s", $data['user'],
      832. $data['user']);
      833. }
      834. // Set ownning group permissions.
      835. if (array_key_exists("group", $data)) {
      836. $aclspec[] = sprintf("default:group::%s,group::%s", $data['group'],
      837. $data['group']);
      838. }
      839. // Set permissions of others.
      840. if (array_key_exists("other", $data)) {
      841. $aclspec[] = sprintf("default:other::%s,other::%s", $data['other'],
      842. $data['other']);
      843. }
      844. // Build the command arguments.
      845. $cmdargs = array();
      846. if (TRUE === boolval($data['replace'])) {
      847. $cmdargs[] = "--remove-all";
      848. }
      849. if (TRUE === boolval($data['recursive'])) {
      850. $cmdargs[] = "--recursive";
      851. }
      852. if (!empty($aclspec)) {
      853. $cmdargs[] = sprintf("-m %s", escapeshellarg(
      854. implode(",", $aclspec)));
      855. }
      856. // Execute command to set the file access control lists.
      857. $outputFile = tempnam(sys_get_temp_dir(), "setfacl");
      858. $cmd = sprintf("export LANG=C; sudo setfacl %s %s >%s 2>&1 & echo $!",
      859. implode(" ", $cmdargs), escapeshellarg(sprintf("%s/%s", $sfpath,
      860. $data['file'])), $outputFile);
      861. OMVUtil::exec($cmd, $output, $result);
      862. if ($result !== 0) {
      863. throw new OMVException(OMVErrorMsg::E_EXEC_FAILED,
      864. $cmd, implode("\n", $output));
      865. }
      866. // Remember pid and content filename in session
      867. $pid = intval($output[0]);
      868. $_SESSION['execjob'][$pid] = array(
      869. "pid" => $pid,
      870. "outputFile" => $outputFile
      871. );
      872. return $pid;
      873. }
      874. /**
      875. * Get the absolute path of a shared folder.
      876. * @param data An array containing the following fields:
      877. * \em uuid The UUID of the shared folder object.
      878. * @return The path of the shared folder.
      879. */
      880. public function getPath($data) {
      881. // $this->debug(var_export(func_get_args(), TRUE));
      882. global $xmlConfig;
      883. // Check permissions
      884. $this->validateSession();
      885. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      886. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      887. }
      888. // Validate method parameters
      889. $this->validateParams(__METHOD__, func_get_args());
      890. // Get shared folder configuration object
      891. $xpath = sprintf("//system/shares/sharedfolder[uuid='%s']",
      892. $data['uuid']);
      893. $sfobject = $xmlConfig->get($xpath);
      894. if (is_null($sfobject)) {
      895. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      896. $xpath);
      897. }
      898. // Get the mount point configuration object to build the absolute
      899. // shared folder path.
      900. $xpath = sprintf("//system/fstab/mntent[uuid='%s']",
      901. $sfobject['mntentref']);
      902. $meobject = $xmlConfig->get($xpath);
      903. if (is_null($meobject)) {
      904. throw new OMVException(OMVErrorMsg::E_CONFIG_GET_OBJECT_FAILED,
      905. $xpath);
      906. }
      907. // Return the absolute shared folder path.
      908. return sprintf("%s/%s", $meobject['dir'], $sfobject['reldirpath']);
      909. }
      910. /**
      911. * Get the XPath location path to the configuration objects referencing
      912. * a shared folder configuration object.
      913. * @param data An array containing the following fields:
      914. * \em uuid The UUID of the shared folder configuration object.
      915. * \em uuid The UUID of the shared folder configuration object.
      916. * @return An array containing the XPath location path of the referencing
      917. * configuration objects.
      918. */
      919. public function getReferencers($data) {
      920. // $this->debug(var_export(func_get_args(), TRUE));
      921. global $xmlConfig;
      922. // Check permissions
      923. $this->validateSession();
      924. if (!$this->hasRole(OMV_ROLE_ADMINISTRATOR)) {
      925. throw new OMVException(OMVErrorMsg::E_RPC_SERVICE_INVALID_PERMISSION);
      926. }
      927. $this->commitSession();
      928. // Validate method parameters
      929. $this->validateParams(__METHOD__, func_get_args());
      930. // Get a list of XPath's to the configuration objects referencing the
      931. // given shared folder.
      932. $objects = $xmlConfig->getXPathList("//sharedfolderref[contains(.,".
      933. "'{$data['uuid']}')]/..");
      934. return $objects;
      935. }
      936. }
      937. ?>
      Display All
    • Re: unable to remove a shared folder

      Source Code

      1. </network>
      2. <usermanagement>
      3. <homedirectory>
      4. <enable>0</enable>
      5. <sharedfolderref>7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>
      6. </homedirectory>


      In this part of your config.xml just delete this "7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>"

      Under User/Settings in the web-gui you had dropped down the drop down box and selected a shared folder as the home folder for a user. You did no enable it. You need to make sure this setting is none. If any share is selected for any user you will not be able to erase the shared folder. All services must be removed from a share before it can be deleted in the web-gui. This is a safety feature so people don't accidentally break services that are using a share.
    • Re: unable to remove a shared folder

      I did that but now omv is unable to display gui.


      EDIT:

      I've set enable to 0:

      <homedirectory>
      <enable>0</enable>
      <sharedfolderref>7b1b05f6-cb65-4750-b530-ad380131282d</sharedfolderref>


      And in GUI selected none as you told

      I learn a lot with this mistake

      Thank you again