What's new

Diversion Does Diversion require entware? Can I hide folder?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!


Senior Member
I installed diversion on my RT-AX86U and it has replaced my freshtomato ad blocking script + Pihole with no noticable change in ads.

However, it has placed a entware/ folder on my sda2 drive which I use for both media streaming and a shared network drive for my home which I use every day for work. Anyone browsing files on a TV or when working on my pc, sees this entware folder that I would rather not exist (I have no other visible folders on the drive).

1) Can I remove entware now that diversion has been installed, or must this folder remain?

2) If it must stay can I hide it? I tried the steps here but it did not work, even after rebooting all devices.

( I only entered the line for entware and not skynet since I don't believe I have that. I did a chmod command (not sure which as it is not in that thread!) which turned the filename green but entware folder is still present).
I think you can choose what folder to share via USB Application > Media Server menu.
1) Can I remove entware now that diversion has been installed, or must this folder remain?
Let me ask you this. If you install Windows would you remove the windows folder in the C:\ drive?

Did you try @ColinTaylor ‘s solution and reboot after?
After trying @ColinTaylor solution, I ran "sh smb.postconf" and it returned:
smb.postconf: line 1: pc_insert: not found
Your /jffs/scripts/smb.postconf file should look like this assuming the share name is "entware".

source /usr/sbin/helper.sh

pc_insert "[entware" "browseable = no" $CONFIG

Test it by rebooting or running:
service restart_samba
This still isn't working for me. Trying to troubleshoot, I performed "sh smb.postconf" and it returned
sed: -i requires an argument

The pc_insert command should perform the command sed -i "s/$PATTERN/$CONTENT/" $3 on the passed variables but something is wrong?
Is the single bracket around [entware correct?
I performed "sh smb.postconf"
That is not valid syntax for running that script. You need to pass the correct parameter to it. Try
sh /jffs/scripts/smb.postconf /etc/smb.conf

But the proper command is
service restart_samba

Is the single bracket around [entware correct?
Yes it is.

If you still can't get it to work post the entire contents of /etc/smb.conf and smb.postconf.
Last edited:
sh /jffs/scripts/smb.postconf /etc/smb.conf
appears to execute (I get no error message)
 service restart_samba
but entware folder is still visible on my Win10 machine as well as my Roku.

netbios name = RT-AX86U-86C8
server string = RT-AX86U
workgroup = WORKGROUP
username level = 20
unix charset = UTF8
display charset = UTF8
load printers = no
printing = bsd
printcap name = /dev/null
log file = /var/log/samba.log
log level = 0
max log size = 5
auth methods = guest
guest account = admin
map to guest = Bad Password
guest ok = yes
encrypt passwords = yes
pam password change = no
null passwords = yes
force directory mode = 0777
force create mode = 0777
max connections = 5
obey pam restrictions = no
use spnego = yes
client use spnego = no
disable spoolss = yes
host msdfs = no
strict allocate = no
wide links = no
bind interfaces only = yes
interfaces = lo br0
use sendfile = yes
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = no
dos filemode = yes
oplocks = yes
level2 oplocks = yes
kernel oplocks = no
enable core files = no
deadtime = 30
load printers = no
printable = no
max protocol = SMB2
smb encrypt = disabled
min receivefile size = 16384
passdb backend = smbpasswd
smb passwd file = /etc/samba/smbpasswd
comment = Samsung PSSD T7's sda2
veto files = /.__*.txt*/asusware*/asus_lighttpdpasswd/
path = /tmp/mnt/sda2
writeable = yes
dos filetimes = yes
fake directory create times = yes


source /usr/sbin/helper.sh

pc_insert "[entware" "browseable = no" $CONFIG

Not sure if this matters but my networked drive on the Asus Merlin router is sda2 not sda1. I had an sda1 drive before on an older tomato router that I no longer use but I can see the sda2 is defined in the smb.conf file.
It's not working because you don't have a shared drive called "entware" as you have enabled guest login (which shares the entire drive as a single volume).
I see. What I was trying to do is hide the FOLDER called entware on my sda2 drive
Can this be done? Not a huge deal but it is mildly annoying to see it and some people will browse into the entware folder from my TV, etc.

It's the only (visible) folder on the root directory--I store files on there (files used for work and also streaming audio/video files)
If there was a separate volume called entware I wouldn't mind that at all, but I think some of my access devices (ie Roku) need guest access to read the DLNA files. Anyway thanks for the help. If it can't be hidden I'll just try to ignore it.
Try using this /jffs/scripts/smb.postconf file instead of the other one.

source /usr/sbin/helper.sh

pc_replace "veto files = " "veto files = /entware" $CONFIG
Make sure you enter the pc_replace line exactly as shown, including the spaces.

Then service restart_samba

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!