Im using ubuntu 20.04 on a vps and im looking to use samba to simply hide folders from users who cant edit/open them. As far as i know, samba is used to share files to windows computers or other systems. This is not what i am trying to achieve. The only thing i want to use samba for, is to hide those folders to a list of blacklisted users, and make them visible to another set of them. It is hard for me to test things out since i only have one vps which i cannot reset, subsequently i have not done much testing myself. Most tutorials i have found online assume that you would want to use the sharing to other systems, which as already stated, I do not want to do. Any help of sorts would be greatly appreciated.

Example: I have 3 users and a personal folder for each user.(They all have their own user account) I want to prevent other users from seeing personal folders from the other users.

(There is another question on here which asks the same thing, but the question is related to the desktop version instead of the CLI version. I look through the post and couldnt find any helpful information on how to fix my problem.)


If you were talking about users connecting to a share from another system, I would say add 'access based share enum = yes' to the share, but it sounds like you mean users logging into a computer directly. If this is the case, then blocking users from seeing a directory on a Linux computer has nothing to do with Samba and I do not think you can stop them seeing the other directories.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.