Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
12-03-2013, 02:59 PM
|
#1
|
LQ Newbie
Registered: Dec 2013
Posts: 2
Rep:
|
Samba Share permission problems
Hi (I'n new here), and I have the following problem:
Two computers (both run gnu/linux), the "client" computer has a user "bob", the "server" has a user named "tom". On the server, there should be a samba share that both, bob and tom can access. What's important to me is that when "bob" does something with the share he should do it with the exact same permissions that tom has on that directory. is that possible? if yes, how? if no, what else can I do besides force samba to create everything with 777 permissions, that still results in both tom and bob being able to access the files?
On the SERVER I did:
sudo smbpasswd -a tom (and then I set the password)
I created a samba share, with a smb.config file like this:
[global]
workgroup = WORKGROUP
security = User
allow guests = No
[library]
path=/media/usb3tb
valid users = tom
read only = no
writeable = yes
force user = tom
I mounted the share (on the client machine) like this:
//10.0.0.7/library /mnt/Share cifs username=tom,password=XXXX,uid=tom's uid,gid=tom's gid0 0
I can see all the files, but when I create something I get a "permission denied" error, and see that the created file has 0 bytes and has been created with the umask of tom - so I can't do anything with it. What I want is being able to do things "In tom's name". Does samba let me do this somehow and if not what would you suggest that's quick and doesn't involve 777?
Thanks in advance,
simon
|
|
|
12-04-2013, 01:41 PM
|
#2
|
Member
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319
Rep:
|
Does tom actually have permission to write to /media/usb3tb?
Also if you wanted to make tom and bob the same do it by group.
|
|
|
12-05-2013, 03:46 AM
|
#3
|
Member
Registered: May 2013
Distribution: Arch Linux
Posts: 86
Rep:
|
Check the selinux log files and if selinux turns out to be the problem then you can either turn it off with
Code:
setenforce 0 && sed -i 's/\(SELINUX=\)enforcing/\1permissive/' /etc/selinux/config
or change the context of /media/usb3tb with
Code:
chcon -t samba_share_t /media/usb3tb
Also make sure that tom is a user that has write permissions to the file (e.g., file owner or a member of group.)
Last edited by wstewart90; 12-05-2013 at 03:47 AM.
|
|
|
12-05-2013, 05:54 AM
|
#4
|
LQ Newbie
Registered: Aug 2013
Posts: 29
Rep:
|
Quote:
Originally Posted by wstewart90
Check the selinux log files and if selinux turns out to be the problem then you can either turn it off with
Code:
setenforce 0 && sed -i 's/\(SELINUX=\)enforcing/\1permissive/' /etc/selinux/config
or change the context of /media/usb3tb with
Code:
chcon -t samba_share_t /media/usb3tb
Also make sure that tom is a user that has write permissions to the file (e.g., file owner or a member of group.)
|
I think the tom do not have sufficient permission to create and file or edit.
|
|
1 members found this post helpful.
|
12-13-2013, 05:34 AM
|
#5
|
LQ Newbie
Registered: Dec 2013
Posts: 2
Original Poster
Rep:
|
Thanks guys, I solved the problem. I needed to create the user on the server as well, of course.
|
|
|
All times are GMT -5. The time now is 12:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|