What's new

Hide folders in windows share

  • 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!

fernando_montalban

New Around Here
Hi, been trying to look for a thread all over but can't seem to find the perfect combination of keywords to search for.

Is there a way to hide folders from showing up in Network Share?
The only options in the UI is "R/W", "R", and "NO".

I have three folders in my HD. "asusware", "Download2", and "shared".

Whenever people are accessing in windows (Network>RT-AC66U) they see all three folders. It's actually ok as the user access they are using does not let them open the folders but would just like to hide the "asusware" and "Download2" folders entirely.

Thank you!

Note:
Posted it here on asuswrt-merlin forum as I am using merlin's latest FW for AC66U.
 
Last edited:
Try this:

Create file /jffs/configs/smb.conf.add
with this content:
hide unreadable = yes
 
Run WinSCP and change change folder name starting with "."
For example: Video -> .Video
Windows will not be able to see this folder
 
Try this:

Create file /jffs/configs/smb.conf.add
with this content:
hide unreadable = yes

Hi,

Thank you for your response.
I really have no idea regarding things like this. I am only able to do things as I see them in the UI of the web interace.

by create file? do you mean create a folder named jffs on the HD? then another folder inside named "configs"? then create a text document with "hide unreadable = yes" and save as "smb.conf.add"?
 
Change the share name and include $ at the end of sharename.

for example Download2 -> Download2$.

To access hidden share you need to manually add in under "map network share" or browse using file explorer and include the $ sign...
 
I really have no idea regarding things like this. I am only able to do things as I see them in the UI of the web interace.

I'll try a step by step instructions:
- Go to Administration/System
- Set Enable JFFS partition to Yes
- If JFFS was not enabled before, also set Format JFFS partition at next boot to Yes
- If you had to enable JFFS, reboot the router (you do not need to reboot if JFFS was already enabled)
- Go to Tools/Run Cmd
- Enter mkdir -p /jffs/configs and click Refresh
- Enter echo "hide unreadable = yes" > /jffs/configs/smb.conf.add and click Refresh
- Reboot the router
 
Last edited:
Try this:

Create file /jffs/configs/smb.conf.add
with this content:
hide unreadable = yes

I tried this I could see the line appended, but it didn't make any difference. I also tried veto files.

An edited /jffs/configs/smb.conf did, but I was after something a bit less disk dependent.

Reading some info on samba it should rescan smb.conf so I removed the jffs/configs override and tried in place editing.

Code:
[Not Shared (at LABEL)]
comment = LABEL's Not Shared in Generic External
path = /tmp/mnt/LABEL/Not Shared
dos filetimes = yes
fake directory create times = yes
valid users = admin, user
invalid users = admin, user
read list = 
write list =

The shares are in a nice pattern starting with brackets + 8 lines so I tried this to remove the above lines
Code:
sed -i -ne '/\[Not Shared /{n;n;n;n;n;n;n;n;d;}' -e p /etc/smb.conf

I could swear I had the right syntax for 8d instead of all those n's, but I overwrote it and couldn't get back to it somehow so I left it to get on with the testing.

It worked, but was a bit unreliable with further testing it seems firstly you need to stop and start samba with commands prior to using it.

Secondly they need to alternate between

Code:
services stop_samba
services start_samba

Code:
services stop_nasapps
services start_nasapps
 
smb.conf.add won't work since it will append it at the end of the file, i.e. it will end up in a share's configuration block.

You need to use a postconf script to be able to insert it either inside the share that requires it.
 
'hide unreadable' just seems to be ignored I tested it in /jffs/configs/smb.conf in various positions.

I don't know if has little or anything to do with, but I thought I'd mention this was on 3.0.0.4.374.36_beta1-sdk5 in case someone else wants to try it on their firmware.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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