What's new

How to hide the hidden files

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

Sir Patriot

Regular Contributor
Hi guys
I am sharing my HDD by SAMBA but there is one problem. I can see hidden files like System Volume Information folder and there is no way to hide it.
Can anybody help me?
 
There's parameters one can use in the smb.conf file, either global or on a share basis...

# hide files start with a dot (.)
hide dot files = yes

# hide selected files. example files start with ($)
hide files = /$*/

# hide pipes, sockets, devices ...
hide special files = yes

# hide files with no read permissions
hide unreadable = yes

# hide files with no write permissions
hide unwriteable files = yes
 
There's parameters one can use in the smb.conf file, either global or on a share basis...

# hide files start with a dot (.)
hide dot files = yes

# hide selected files. example files start with ($)
hide files = /$*/

# hide pipes, sockets, devices ...
hide special files = yes

# hide files with no read permissions
hide unreadable = yes

# hide files with no write permissions
hide unwriteable files = yes
So what should I do? :D:p
 
Hehe, I gave you the bullets, but I won't give you the gun :D

find the Samba configuration file, and backing it up first, you can add those switches (yes/no) as needed - remember that any change, you'll need to restart the samba service.
 
Hehe, I gave you the bullets, but I won't give you the gun :D

find the Samba configuration file, and backing it up first, you can add those switches (yes/no) as needed - remember that any change, you'll need to restart the samba service.
Where should I look for it? :D :oops:
 
Interesting. If I create /jffs/configs/smb.conf.add and add this to it I get no logging:
Code:
# hide files start with a dot (.)
hide dot files = yes

# hide selected files. example files start with ($)
#hide files = /$*/

# hide pipes, sockets, devices ...
hide special files = yes

# hide files with no read permissions
hide unreadable = yes

# hide files with no write permissions
hide unwriteable files = yes

#logging
log level = 4
log file = /tmp/mnt/sda1/logs/samba.log

The log file is not created. Looking at the /tmp/etc/smb.conf file it says:
Code:
log file = /var/log.samba
log level = 0
Yet /var/log.samba does not exist. Probably because of the log level = 0 setting.
You have to override the logfile path and level with a postconf file or replace it with a smb.conf in /jffs/configs/

Edit: /var/log.samba exists. If you look in /var/ and not /var/log/ as I for some reason did...
 
Last edited:
Interesting. If I create /jffs/configs/smb.conf.add and add this to it I get no logging:
I think you need to add them to the appropriate section....either [global] or the share via a postconf script....not via a conf.add
 
ctrl+h will also hide/unhide files you have named with a . at the beginning.
 
@john9527 If you copy the content of /tmp/etc/smb.conf and paste it into /jffs/configs/smb.conf and change the values you want it works just fine - for testing purposes.
The proper way is as you said in /jffs/scripts/smb.postconf where you would replace the standard entries with something like this (make the file executable):

Code:
#!/bin/sh
CONFIG=$1
source /usr/sbin/helper.sh

pc_replace "log file = /var/log.samba" "log file = /tmp/mnt/sda1/logs/samba.log" $CONFIG
pc_replace "log level = 0" "log level = 4" $CONFIG
pc_replace "max log size = 5" "max log size = 50" $CONFIG

And /var/log.samba exists. If you look in /var/ and not /var/log/ as I did for some reason...
 
I did what exactly it says but System Volume Information folder is still there and it does not allow me to to delete it.
Any suggestion?
You could try the following:

1) Attach the USB drive to your PC
2) Run the Command Prompt as Administrator
3) Enter the following commands, changing "z:" to whatever letter your USB drive is mounted as.
Code:
TAKEOWN /F "z:\System Volume Information" /R

ATTRIB /S -r -a -h -s "z:\System Volume Information"

DEL /S "z:\System Volume Information"
 
You could try the following:

1) Attach the USB drive to your PC
2) Run the Command Prompt as Administrator
3) Enter the following commands, changing "z:" to whatever letter your USB drive is mounted as.
Code:
TAKEOWN /F "z:\System Volume Information" /R

ATTRIB /S -r -a -h -s "z:\System Volume Information"

DEL /S "z:\System Volume Information"
Untitled.png

Access is denied !!! :(
Still there and non removable !
 
Try:
Code:
ATTRIB -r -a -h -s "G:\System Volume Information\*.*" /S /D
or
Code:
ATTRIB -r -a -h -s "G:\System Volume Information\*" /S /D
 
Last edited:

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

Staff online

Top