{"id":257,"date":"2020-05-07T14:39:00","date_gmt":"2020-05-07T09:09:00","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/24x7serversupport-blog\/?p=257"},"modified":"2023-01-28T12:54:18","modified_gmt":"2023-01-28T07:24:18","slug":"setting-up-virtual-user-with-vsftpd-with-different-permissions","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/","title":{"rendered":"Setting up Virtual user with VSFTPD with Different Permissions"},"content":{"rendered":"\n<p>If you want to  setup a virtual user with  VSFTPD and also want to  share the same directory across multiple users then you can refer the below simple steps to achieve this :<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h4 class=\"wp-block-heading\">Install VSFTPD  server<\/h4>\n<\/div><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install vsftpd<\/pre>\n\n\n\n<p>Open the \/etc\/vsftpd\/vsftpd.conf file and add the below contents :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> anonymous_enable=NO\n local_enable=YES\n chroot_local_user=YES\n user_config_dir=\/etc\/vsftpd\/vsftpd-virtual-user\/\n virtual_use_local_privs=YES\n dual_log_enable=YES\n connect_from_port_20=YES\n listen=YES\n pam_service_name=vsftpd\n local_root=\/home\/share-drive\n tcp_wrappers=YES\n pasv_enable=YES\n pasv_max_port=55000\n pasv_min_port=50000\n pasv_address=10.10.10.14\n local_umask=0002<\/pre>\n\n\n\n<p>save and quit<\/p>\n\n\n\n<p>Here pasv_address=10.10.10.14 is explicitly used to map the nat IP  to  public IP for passive port<\/p>\n\n\n\n<p>Now go  to  directory \/etc\/vsftpd\/vsftpd-virtual-user\/ and create the file :: vsftpd_user<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/etc\/vsftpd\/vsftpd-virtual-user\/<\/pre>\n\n\n\n<p>Note :: You need to  create the directory : \/etc\/vsftpd\/vsftpd-virtual-user\/ if it doesn\u2019t exist<br>In vsftpd_user file add the usernames for which you want to set per user  configuration<\/p>\n\n\n\n<p>root@server~[#] cat vsftpd_user<br> test<br> test1<\/p>\n\n\n\n<p>Now create the usernames file as ::<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@server~[#] cat test\n local_root=\/home\/share-drive<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">cmds_allowed=USER,PASS,SYST,FEAT,OPTS,PWD,TYPE,PASV,LIST,STOR,CWD,MKD,SIZE,MDTM,CDUP,RETR,RNFR,RNTO<br>\n hide_file={<em>.xml}\n deny_file={<\/em>.xml}<br>\n file_open_mode=0666<br>\n local_umask=0002<br>\n write_enable=YES<\/pre>\n\n\n\n<p>Here, deny_file will limit the access to specific files and folders for user test and same will be used for hiding the files<\/p>\n\n\n\n<p>To use the benefit of share\/common directory add the users as ::<\/p>\n\n\n\n<p>First create a group called :  ftp_users<\/p>\n\n\n\n<p>then add the users as ::<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd -d \/home\/share-drive -s \/sbin\/nologin username<\/pre>\n\n\n\n<p>Once done that, use the command usermod -G ftp_users test this will facilitates all the files and folders creation with test:ftp_users .<\/p>\n\n\n\n<p>To  add new user use :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">  useradd -d \/home\/share-drive -s \/sbin\/nologin -g  ftp-users test1<\/pre>\n\n\n\n<p>Finally,  restart the VSFTPD service and you are done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to setup a virtual user with VSFTPD and also want to share the same directory across multiple users then you can refer the below simple steps to achieve this : Install VSFTPD server yum install vsftpd Open the \/etc\/vsftpd\/vsftpd.conf file and add the below contents : anonymous_enable=NO local_enable=YES chroot_local_user=YES user_config_dir=\/etc\/vsftpd\/vsftpd-virtual-user\/ virtual_use_local_privs=YES dual_log_enable=YES [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3614,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[30],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to setup virtual user with vsftp with different permission<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to setup virtual user with vsftp with different permission\" \/>\n<meta property=\"og:description\" content=\"If you want to setup a virtual user with VSFTPD and also want to share the same directory across multiple users then you can refer the below simple steps to achieve this : Install VSFTPD server yum install vsftpd Open the \/etc\/vsftpd\/vsftpd.conf file and add the below contents : anonymous_enable=NO local_enable=YES chroot_local_user=YES user_config_dir=\/etc\/vsftpd\/vsftpd-virtual-user\/ virtual_use_local_privs=YES dual_log_enable=YES [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-07T09:09:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-28T07:24:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"715\" \/>\n\t<meta property=\"og:image:height\" content=\"296\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/\",\"name\":\"How to setup virtual user with vsftp with different permission\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1\",\"datePublished\":\"2020-05-07T09:09:00+00:00\",\"dateModified\":\"2023-01-28T07:24:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1\",\"width\":715,\"height\":296,\"caption\":\"Setting up Virtual user with VSFTPD with Different Permissions\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up Virtual user with VSFTPD with Different Permissions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to setup virtual user with vsftp with different permission","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/","og_locale":"en_US","og_type":"article","og_title":"How to setup virtual user with vsftp with different permission","og_description":"If you want to setup a virtual user with VSFTPD and also want to share the same directory across multiple users then you can refer the below simple steps to achieve this : Install VSFTPD server yum install vsftpd Open the \/etc\/vsftpd\/vsftpd.conf file and add the below contents : anonymous_enable=NO local_enable=YES chroot_local_user=YES user_config_dir=\/etc\/vsftpd\/vsftpd-virtual-user\/ virtual_use_local_privs=YES dual_log_enable=YES [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-05-07T09:09:00+00:00","article_modified_time":"2023-01-28T07:24:18+00:00","og_image":[{"width":715,"height":296,"url":"https:\/\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg","type":"image\/jpeg"}],"author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/","url":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/","name":"How to setup virtual user with vsftp with different permission","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage"},"image":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1","datePublished":"2020-05-07T09:09:00+00:00","dateModified":"2023-01-28T07:24:18+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#primaryimage","url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1","width":715,"height":296,"caption":"Setting up Virtual user with VSFTPD with Different Permissions"},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/setting-up-virtual-user-with-vsftpd-with-different-permissions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting up Virtual user with VSFTPD with Different Permissions"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/Setting-up-Virtual-user-with-VSFTPD-with-Different-Permissions.jpg?fit=715%2C296&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":2,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":3616,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions\/3616"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media\/3614"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}