Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 have a fedora box running in my office. A friend who works in the same building was nice enough to set up a samba share on his PC so I can share all his music, media, etc.
The problem is I have a couple different people using my linux computer and I would hate for one of them to accidentally erase his files, or even use them without his permission.
I was wondering if I can setup permissions on the mount point or something. So only I can access the share.
Now keep in mind I am fairly savy but not really a linux guru by any means.
Here is how he has me mounting it in my /etc/fstab:
Here's an old snippet I like to reference from something I once did. If your fstab is readable by users, they can get your password. That's why I recommend the credentials file.
Here's an old snippet I like to reference from something I once did. If your fstab is readable by users, they can get your password. That's why I recommend the credentials file.
Don't read too much into what I posted. I copied/pasted an example which you should modify to your needs. Yes -- use the UID of the user on the local system who should have access. Change the GID to your personal group (if you have uid 1000, you likely have gid 1000). You can cat /etc/passwd and /etc/group to see this info. Where I listed 'psc' above, you should have 'savone'.
Also, I took a look at "man 8 mount.cifs" and see that you might be interested in file_mode and dir_mode. I have modified your original fstab line to what I think would work (If you setup the credentials file. Otherwise put your user/pass back in)
Don't read too much into what I posted. I copied/pasted an example which you should modify to your needs. Yes -- use the UID of the user on the local system who should have access. Change the GID to your personal group (if you have uid 1000, you likely have gid 1000). You can cat /etc/passwd and /etc/group to see this info. Where I listed 'psc' above, you should have 'savone'.
Also, I took a look at "man 8 mount.cifs" and see that you might be interested in file_mode and dir_mode. I have modified your original fstab line to what I think would work (If you setup the credentials file. Otherwise put your user/pass back in)
THANK YOU so much for your help, I just wanted to make sure you know how appreciative I am.
So this worked out great. I did look at the man page but it seems you have to already KNOW the terminology to be able to understand those man pages. Thanks to your help I learned a great deal and have the permissions I wanted on the share. I really appreciate you sticking with me through it.
THANK YOU so much for your help, I just wanted to make sure you know how appreciative I am.
So this worked out great. I did look at the man page but it seems you have to already KNOW the terminology to be able to understand those man pages. Thanks to your help I learned a great deal and have the permissions I wanted on the share. I really appreciate you sticking with me through it.
Look at the next 4 links especially the last two in my sig to assist you in understanding;
now the share has permissions for rwx for me (uid 500) and read for the group mp3users. Anyone I assign to the group mp3users will have read access to the mp3 but can not delete or write to any of the directories.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.