Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been trying to figure out for awhile how to password protect just one folder in my samba main directory.
To explain I have a family here that also uses the file server... So there is files on the file server they use too but I want to show my web folder on the samba server too but I don't want anyone but me being able to get into the folder changing or anything, or even viewing it without a password first. How would this be done?
One way is to create a folder, say /home/family and share it twice in Samba, once as "family" and again as "family-ro". Make the first share accessible r/w to yourself and whoever, and the second accessible to everyone r/o.
I didn't read your original post well enough. I don't know how to protect one folder INSIDE of an existing r/w share. To do what I wrote, you'd need to create a second folder OUTSIDE the original share. Then you can share this second folder two ways, r/w and r/o, depending on who's trying to access it.
(I'm actually not sure what would happen if you tried to share a folder r/o inside an existing r/w share.)
Just a case of setting the right security in your smb.conf for that specific share. I believe if you set "valid users = yourusername" and then configure smbpasswd correctly, then only you would be able to access that specific share.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.