{"id":10441,"date":"2019-04-09T16:05:46","date_gmt":"2019-04-09T14:05:46","guid":{"rendered":"https:\/\/www.dreamsworld.it\/emanuele\/?p=10441"},"modified":"2019-04-09T16:05:46","modified_gmt":"2019-04-09T14:05:46","slug":"ftpd-su-freenas-step-by-step","status":"publish","type":"post","link":"https:\/\/www.dreamsworld.it\/emanuele\/2019-04-09\/ftpd-su-freenas-step-by-step\/","title":{"rendered":"FTPD su FreeNAS step by step"},"content":{"rendered":"\n<ul class=\"wp-block-list\"><li>Crea una nuova <a href=\"https:\/\/en.wikipedia.org\/wiki\/FreeBSD_jail\">Jail<\/a> in modo da non sporcare il sistema di base (puoi farlo via SSH usando <em>iocage create<\/em> o via GUI)<\/li><li>Via SSH, dopo essere entrato (<em>con jexec &lt;id> tcsh<\/em>) nella jail appena creata crea l&#8217;utente utilizzando <em>adduser<\/em> e aggiungilo al gruppo <em>ftp<\/em><\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>root@FTPServer:\/ # adduser\nUsername: testUser\nFull name: Utente di prova\nUid (Leave empty for default):\nLogin group [testUser]:\nLogin group is testUser. Invite testUser into other groups? []: ftp\nLogin class [default]:\nShell (sh csh tcsh nologin) [sh]: sh\nHome directory [\/home\/testUser]:\nHome directory permissions (Leave empty for default):\nUse password-based authentication? [yes]:\nUse an empty password? (yes\/no) [no]:\nUse a random password? (yes\/no) [no]: yes\nLock out the account after creation? [no]:\nUsername   : testUser\nPassword   : &lt;random>\nFull Name  : Utente di prova\nUid        : 1002\nClass      :\nGroups     : testUser ftp\nHome       : \/home\/testUser\nHome Mode  :\nShell      : \/bin\/sh\nLocked     : no\nOK? (yes\/no): yes<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Per evitare che l&#8217;utente creato possa navigare oltre la sua home, crea <em>\/etc\/ftpchroot<\/em> e inserisci il nome dell&#8217;utente appena creato<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>root@FTPServer:\/ # cd etc\nroot@FTPServer:\/etc # touch ftpchroot\nroot@FTPServer:\/etc # vi ftpchroot<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Ripeti le operazioni 2 e 3 per ogni utente che vuoi creare<\/li><li>Inserisci in <em>\/etc\/rc.conf<\/em> l&#8217;impostazione <em>ftpd_enable=&#8221;YES&#8221;<\/em><\/li><li>Dai <em>service ftpd start<\/em> via SSH<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>root@FTPServer:\/etc # service ftpd start\nStarting ftpd.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ovviamente dovrai assegnare <a href=\"https:\/\/ixsystems.com\/documentation\/freenas\/11.2\/jails.html?highlight=mountpoint#additional-storage\">un mountpoint<\/a> esistente sul tuo pool di FreeNAS e collegarlo ad <em>\/home\/testUser<\/em> interno alla jail.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Emanuele<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Crea una nuova Jail in modo da non sporcare il sistema di base (puoi farlo via SSH usando iocage create o via GUI) Via SSH, dopo essere entrato (con jexec &lt;id> tcsh) nella jail appena creata crea l&#8217;utente utilizzando adduser &hellip; <a href=\"https:\/\/www.dreamsworld.it\/emanuele\/2019-04-09\/ftpd-su-freenas-step-by-step\/\">Leggi ancora &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_post_was_ever_published":false},"categories":[3],"tags":[2782,2753,1388,1844,640,2749],"class_list":["post-10441","post","type-post","status-publish","format-standard","hentry","category-computer","tag-freebsd","tag-freenas","tag-ftp","tag-guida","tag-how-to","tag-sharing"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts\/10441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/comments?post=10441"}],"version-history":[{"count":0,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/posts\/10441\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/media?parent=10441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/categories?post=10441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dreamsworld.it\/emanuele\/wp-json\/wp\/v2\/tags?post=10441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}