[Samba] Samba Share Issue Folder and files cant created
babinlonston at live.com
Fri Jul 5 11:25:37 MDT 2013
Hi All ,
This Is Babin Lonston
Facing a Small trouble for last 2 days , Im using Centos 6.3 and only the purpose of using centos is to use samba Service , Centos 6.3 machine assigned with a Static IP address of (192.168.1.15) in Local area , And have the hostname with (sambafileserver), Created a folder public/
Created a smbpasswd -a root Created a smbpasswd -a sysadmin
[root at sambafileserver /]# ll -ld public/drwxrwxr-x+ 2 root root 4096 Jul 5 16:08 public/
And this Have shared for client machines and even i can access the share in all client machine and i have mounted the Share in client machine , its mounted inside the home directory of all client machines
mount -t cifs //192.168.1.15/public /home/sysadmin/public/
And fstab entry too given as
//192.168.1.15/public /home/sysadmin/public cifs username=sysadmin,password=admin123$,rw,_netdev 0 0
After a Restart its Automatically mounting into the specifed Directory were i have mounted ..But i can't Create a Folder inside /home/sysadmin/public which was mounted from //192.168.1.15/public
[root at sambafileserver /]# sestatusSELinux status: enabledSELinuxfs mount: /selinuxCurrent mode: enforcingMode from config file: enforcingPolicy version: 24Policy from config file: targeted
After creatind /public folder i have given used to change chcon and setsebool those command are here please have a look
#chcon -Rt samba_share_t public/
[root at sambafileserver /]# ll -Zd public/ drwxrwxr-x+ root root unconfined_u:object_r:samba_share_t:s0 public/
[root at sambafileserver /]# setfacl -m u:nobody:rwx public/
After those all not fixed the issue so i have changed these , even so not fixed
#setsebool -P samba_export_all_rw on #setsebool -P samba_enable_home_dirs on
Let me Give my smb.conf entry
[global] # ----------------------- Network Related Options -------------------------## workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH## server string is the equivalent of the NT Description field## netbios name can be used to specify a server name not tied to the hostname## Interfaces lets you configure Samba to use multiple interfaces# If you have multiple network interfaces then you can list the ones# you want to listen on (never omit localhost)## Hosts Allow/Hosts Deny lets you restrict who can connect, and you can# specifiy it as a per share option as well# workgroup = MYGROUP server string = Samba Server Version %v ; netbios name = MYSERVER interfaces = lo eth0 127.0.0.1/0 192.168.1.1/24 hosts allow = 127. 192.168.1. 192.168.0. 192.168.2.
# ----------------------- Standalone Server Options ------------------------## Scurity can be set to user, share(deprecated) or server(deprecated)## Backend to store user information in. New installations should # use either tdbsam or ldapsam. smbpasswd is available for backwards # compatibility. tdbsam requires no further configuration.
security = user passdb backend = tdbsam
#============================ Share Definitions ============================== [homes] comment = Home Directories browseable = yes writable = yes valid users = sysadmin; valid users = MYDOMAIN\%S [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes # Un-comment the following and create the netlogon directory for Domain Logons; [netlogon]; comment = Network Logon Service; path = /var/lib/samba/netlogon; guest ok = yes; writable = no; share modes = no # Un-comment the following to provide a specific roving profile share# the default is to use the user's home directory; [Profiles]; path = /var/lib/samba/profiles; browseable = no; guest ok = yes # A publicly accessible directory, but read only, except for people in# the "staff" group; [public]; comment = Public Stuff; path = /home/samba; public = yes; writable = yes; printable = no; write list = +staff
[public] comment = Public Stuffs path = /public public = yes writable = yes browseable = yes printable = no write list = +staff
Only The issue i cant Create a folder and create any files inside the Samba Shared folder ...
Please give me a Solution to get rectified ...
More information about the samba