{"id":1506,"date":"2013-05-07T08:40:15","date_gmt":"2013-05-07T07:40:15","guid":{"rendered":"http:\/\/www.javiercarrasco.es\/?p=1506"},"modified":"2013-05-07T08:40:15","modified_gmt":"2013-05-07T07:40:15","slug":"samba-error-255-net-usershare-add-cannot-share-path","status":"publish","type":"post","link":"https:\/\/www.javiercarrasco.es\/?p=1506","title":{"rendered":"Samba &#8211; error 255: net usershare add: cannot share path"},"content":{"rendered":"<pre>La \u00abred compartida\u00bb devolvi\u00f3 el error 255:\nnet usershare add: cannot share path \/media\/DATOS\/Cosas as we are\nrestricted to only sharing directories we own.\nAsk the administrator to add the line \"usershare owner only = false\"\nto the [global] section of the smb.conf to allow this.<\/pre>\n<p>Este mensaje de error apareci\u00f3 al intentar compartir un directorio de una <a title=\"Montar una partici\u00f3n NTFS en Linux\" href=\"http:\/\/www.javiercarrasco.es\/2012\/09\/02\/montar-una-particion-ntfs-en-linux\/\">partici\u00f3n NTFS montada utilizando el fichero fstab<\/a>, concretamente, cuando no somos propietarios del directorio que queremos compartir.<\/p>\n<p>Es un error bastante sencillo de corregir, el mismo mensaje de error nos da la soluci\u00f3n. El primer paso ser\u00e1 editar el fichero <code>smb.conf<\/code> que encontraremos en <code>\/etc\/samba<\/code>.<\/p>\n<pre>$ sudo gedit \/etc\/samba\/smb.conf<\/pre>\n<p>En mi caso, he buscado la zona donde se encuentran las opciones <em>usershare<\/em>, y he a\u00f1adido la opci\u00f3n <code>usershare owner only = false<\/code>.<\/p>\n<pre># Setup usershare options to enable non-root users to share folders\n# with the net usershare command.\nusershare owner only = false\n\n# Maximum number of usershare. 0 (default) means that usershare is disabled.\n;   usershare max shares = 100\n\n# Allow users who've been granted usershare privileges to create\n# public shares, not just authenticated ones\n   usershare allow guests = yes<\/pre>\n<p>Guardamos el fichero <code>smb.conf<\/code>, y listo, ya podremos compartir sin problemas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>La \u00abred compartida\u00bb devolvi\u00f3 el error 255: net usershare add: cannot share path \/media\/DATOS\/Cosas as we are restricted to only sharing directories we own. Ask the administrator to add the line \u00abusershare owner only = false\u00bb to the [global] section of the smb.conf to allow this. Este mensaje de error apareci\u00f3 al intentar compartir un [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[31,80,114,125],"class_list":["post-1506","post","type-post","status-publish","format-standard","hentry","category-cuaderno-linux","tag-consola","tag-lubuntu","tag-samba","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=\/wp\/v2\/posts\/1506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1506"}],"version-history":[{"count":0,"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=\/wp\/v2\/posts\/1506\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javiercarrasco.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}