SMB Shares on any folder

Got a feature request? Great! Post your ideas here!
timguy
Posts: 4
youtube meble na wymiar Warszawa
Joined: Fri Mar 21, 2025 5:17 am

SMB Shares on any folder

Post by timguy »

Why is SMB shared folders only restricted to folders off the root of the internal drives?

Also, for any USB attached drives why can I not rename the automatic shared folders created like "USB1-2"? Also same question as above for internal drives. Why can we not create SMB shared folders from any folder in the hierarchy. This is pretty standard SMB functionality.

Should be able to create any sort of SMB Share from any folder in the system.
User avatar
father.mande
Posts: 2193
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: SMB Shares on any folder

Post by father.mande »

Hi,
timguy wrote: Fri Mar 21, 2025 5:23 am Why is SMB shared folders only restricted to folders off the root of the internal drives?

Also, for any USB attached drives why can I not rename the automatic shared folders created like "USB1-2"? Also same question as above for internal drives. Why can we not create SMB shared folders from any folder in the hierarchy. This is pretty standard SMB functionality.

Should be able to create any sort of SMB Share from any folder in the system.
NAS is a limited embedded Linux ... not limited by software running on it, but by some change in configuration path and limited configuration options in WebUI interface.

By structure all shared resources is attached to /share (a loop device)
and to complicate some times ... some configuration file are rebuild at boot, through an ADM config file used to regenerate the common configuration file.

For you case :
... as I know it's not possible directly to have share to folder ... and some loops can be create ...
Possible workaround (with Linux skills (basic)

1 ... it's possible to add "follow link" (symlink) option in share config section and it's keep after reboot (the most easy solution ... except some prof. requirement)
... so you can create a share with access right you want
... using a terminal (ssh or APKG in WebUI like shell-in-abox, shellinweb, etc.) create link to folder you want to used, so you can easily access folder using a "group" shared without direct data in ... ; link and data in target are immediately visible (if access right are correct)
=== a little complex BUT useful (and tested)

2 NOT tested ...
... change manually smb.conf to add your own section (never use ADM WebUI after)
smb.conf is in /usr/builtin/etc/samba ... the reload (to use it without reboot '/usr/builtin/etc/init.d/S47smbd reload'

3 you want to manage all by yourself (require good Linux knowledge)
... stop using smb through ADM and use another samba (APKG Entware for ex.) today it's 4.18.8
... package are :

Code: Select all

samba4-admin - 4.18.8-2 - installs: net smbcontrol profiles rpcclient dbwrap_tool eventlogadm ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch tdbbackup tdbdump tdbrestore tdbtool  Administration tools collection
samba4-client - 4.18.8-2 - installs: cifsdd smbclient smbget  The smbclient program implements a simple ftp-like client for accessing SMB shares
samba4-server - 4.18.8-2 - installs: smbd (nmbd) smbpasswd pdbedit testparm (nmblookup) (smbcacls sharesec) (samba samba-tool ntlm_auth samba-gpupdate samba_dnsupdate samba_kcc samba_spnupdate samba_upgradedns samba_downgrade_db)  This provides the basic fileserver service and is the minimum needed to serve file shares. HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
samba4-utils - 4.18.8-2 - installs: smbstatus smbtree mvxattr smbtar (smbcquotas)  Utilities collection
... configure yourself (ex. use smb.conf from ADM to start)

BUT as usual it's you choice and 100% at your own risk. ... to be clear, I have only tested and used workaround 1.

Philippe.
NB you can also open a support ticket to get an official response from Asustor.
Asustor updated :D to ADM 5.0
FS6706T / AS3302Tv2 / AS5202T
Asustor using last ADM 4.x :D
AS6602T
Asustor E.O.L. at A.D.M. 4.0 :(
AS5002T / AS1002T
Asustor past :mrgreen:
AS202T
timguy
Posts: 4
Joined: Fri Mar 21, 2025 5:17 am

Re: SMB Shares on any folder

Post by timguy »

Hey Philippe,

Thanks for the response. I might try route #1. I was looking around the filesystem to see where samba was defined but didn't look hard enough. Now I know.

I've tried configuring Samba servers before and it's easy EXCEPT for supporting the horrible Time Machine. I found attempting to get that working was really not easy. I gave up and is one of the reasons I decided to get the Asustor NAS. HOWEVER, now that I know where samba is I can look at the configuration and maybe take that away to one of my other Linux servers and just get away from Asustor altogether.

The additional reason being is I'm having all sorts of issues with an external attached drive. I haven't figured out why yet. It was working well for about a week and now it's causing all sorts of issues with only MAC systems.

In the end I might keep the Asustor for just the Time Machine backups and move everything back to my own home cooked NAS solution on other Linux servers. But I was looking to consolidate to the Asustor NAS. Note, I'm not using any of the fancy RAID features and such as I don't need that kind of protection at the moment. I have enough off-site backups happening that I'm ok with that sort of setup.
timguy
Posts: 4
Joined: Fri Mar 21, 2025 5:17 am

Re: SMB Shares on any folder

Post by timguy »

Oh, also I think I noticed the official support tickets are different from this forum. I wasn't sure if Asustor support looked here. Probably not.
User avatar
snapshot
Posts: 583
Joined: Sat Mar 16, 2013 6:58 am
Location: Wiltshire, England

Re: SMB Shares on any folder

Post by snapshot »

This is a community forum so any responses come from other users. Currently the majority of responses come from Phillippe and myself.