security - how to prevent standard users from seeing hidden files? - Ask Ubuntu
i have created 2 types of users, 1 admin , standard user.
ctrl+h shortcut see hidden files in of linux file managers.
i want disable option standard user. when standard user tries unhide files system won't anything, disable hide , unhide options.
my primary goal when standard user press ctrl+h system not show hidden files standard user.
secondary goal there no other option see hidden files standard user.
concentrate revoke seeing hidden files because making hidden files easy , time saving compare make separate permission each folder. managing separate permissions each folder time consuming , sophisticated task , need root privilege manage permission or edit permission, want avoid many times calling root. when managing permission many times confuse between system files/folder there probability making silly mistake during manage special permissions per each folder/file. in simple words want revoke access of files names starting .
dot
your last comment says, wanted prevent users seeing hidden files (those starting .
). not possible in linux , never going in security.
because linux uses .hidden files everywhere, users shell configuration stored in hidden files (such .bashrc
, .zshrc
etc). if remove read permission it, users settings removed.
take example. firefox uses .mozilla
directory user in home. if remove read permission, firefox not function normally. can remove execution bit directory, won't prevent users seeing name of .mozilla directory, though can't access further.
you might thinking purpose of .hidden files security, isn't. main goal of not showing files/dirs starting .
cleanliness. thought user need see files s/he uses regularly.
so, way revoke standard users' seeing permission is, using linux standard permission settings. see these questions
prevent ctrl-h showing hidden files.
if want still prevent users using ctrl-h, can apply trick. setting bogus command same keyboard shortcut.
to in unity, go system settings -> keyboard. in shortcut tab, click custom shortcut , + button. set name
field , in command
use /bin/bash -c "echo"
. click apply.
then click on shortcut name @ right end , press ctrl-h. override shortcut , can't see hidden files using shortcut.
note said, not prevent users seeing hidden files using menu options or other means.
Comments
Post a Comment