Results 1 to 4 of 4
I've managed to get a samba server running using CentOS 6.2 and it appears on my network, like it's suppose to. If I log in with the user I've created ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-04-2012 #1Just Joined!
- Join Date
- Apr 2012
- Posts
- 10
File permissions for Samba
I've managed to get a samba server running using CentOS 6.2 and it appears on my network, like it's suppose to. If I log in with the user I've created (call them usr1) it displays the one share I've created for access called "media", like it's suppose to. However whenever I try to change the contents of the file from another computer I get "permission denied", not like it's suppose to.
The file my samba share points to (/media) was owned by root on the CentOS system which I thought was the problem so I made it owned by usr1. This didn't seem to make any difference
what do I need to change so that I can read/write files to the samba share I've created?
My smb.conf for media is
Any help/criticism/non-mockery is greatly and immensely appreciated!Code:[media] path = /media writable = yes browsable = yes valid users = usr1
- 06-05-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
i'm not clear on this - did you change the ownership of the directory itself? e.g.:
Code:chown -R usr1 /media
Last edited by atreyu; 06-05-2012 at 03:56 AM. Reason: -R
- 06-05-2012 #3Just Joined!
- Join Date
- Apr 2012
- Posts
- 10
Yep, that's what I tried. Should I have done something different?
-----------------------------------------------------------------------------------
UPDATE:
Managed to ID the problem but can't seem to fix it.
First tried moving the [media] directory to /home/samba but had the same issue. Disabling SELinux makes everything work fine. Tried modifying directory with:
but after I re-enabled SELinux I was still denied accessCode:chcon -Rv --type=user_home_t /home/samba

Any clue what I'm not doing to allow SELinux to grant samba/samba users access to [media]?Last edited by code_ape; 06-05-2012 at 03:33 PM. Reason: Update
- 06-06-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
have you tried something like this?
see this guide for more info on Samba and SELinux.Code:semanage fcontext -a -t samba_share_t '/media(/.*)?' restorecon -R /media


Reply With Quote

