bizdata
asked on
Create Share on Linux for windows
I have a linux server and four (4) windows machines. I want to share some files on Linux server to use on the windows clients. The Linux server has two hard drives. One was initialized and used as the primary drive.
I created a (SAMBA) folder share successfully which I was able to view and open on the windows machine. I noticed that my share was created in the home directory which is just 4GB and not enough for the files.
I formatted and initialized the second drive and created a share on it following the same instructions I used for folders shared in Home directory. unfortunately, I can only view the folder but cant open the folder.
I suspect it to be a permission issue but as a newbie I'm stuck.
Pls can anybody help me out?
I created a (SAMBA) folder share successfully which I was able to view and open on the windows machine. I noticed that my share was created in the home directory which is just 4GB and not enough for the files.
I formatted and initialized the second drive and created a share on it following the same instructions I used for folders shared in Home directory. unfortunately, I can only view the folder but cant open the folder.
I suspect it to be a permission issue but as a newbie I'm stuck.
Pls can anybody help me out?
Besides the protection, also the username & group are shown in ls -l...
or in a gui. Down forget those to take into account,
chown user:group ....
Can be used to change those.
http://linux.die.net/man/1/chown
or in a gui. Down forget those to take into account,
chown user:group ....
Can be used to change those.
http://linux.die.net/man/1/chown
If you are still having issues with perms, post your smb.conf - there can be user perms setting in there also
ASKER
The permission on the 'Data' folder is drwxrwxrwx. Every settings are the same with the 'Share ' folder, except for the location of the folders. 'Data' folder is on another drive on the server while 'Share' folder is in the /home directory. I can open the 'Share' folder on my windows machine but can not open the 'Data' folder on windows machine.
Below is the SMB.conf file:
Below is the SMB.conf file:
[global]
workgroup= mynetwork
netbios name= linuxserver
security= user
load printer = No
default service= global
path= /home
available= No
encrypt password= yes
[share]
writeable = yes
browseable = yes
admin users = Top
path= /home/share
force user = root
valid users= Top1, Top2, Top3
public= yes
available= yes
[Data]
writeable = yes
browseable = yes
admin users = Top
path= /media/Datastore1/Data
force user = root
valid users= Top1, Top2, Top3
public= yes
available= yes
workgroup= mynetwork
netbios name= linuxserver
security= user
load printer = No
default service= global
path= /home
available= No
encrypt password= yes
[share]
writeable = yes
browseable = yes
admin users = Top
path= /home/share
force user = root
valid users= Top1, Top2, Top3
public= yes
available= yes
[Data]
writeable = yes
browseable = yes
admin users = Top
path= /media/Datastore1/Data
force user = root
valid users= Top1, Top2, Top3
public= yes
available= yes
For the data you need at least execute access for /media & /media/Datastore1 for users Top1..3
Did you check the samba logging for any problems?
Another thought:
Did you activate SELinux? if it is disabled.. ok if it is enabled is it Permissive of Enforcing.
If it is Enforcing you need to check the audit logs for any problems.
(see /var/log/audit )
If it permissive als check if there are errors/warnings w.r.t. you files/shares.
Did you check the samba logging for any problems?
Another thought:
Did you activate SELinux? if it is disabled.. ok if it is enabled is it Permissive of Enforcing.
If it is Enforcing you need to check the audit logs for any problems.
(see /var/log/audit )
If it permissive als check if there are errors/warnings w.r.t. you files/shares.
ASKER
SELinux = Enforcing. I'm still reviewing the log but can't get any clue as to what the problem might be
Do a tail -f of the log (the're be a ton of messages) ;-/
And see what messages get added when you try access, also check the samba logs.
And see what messages get added when you try access, also check the samba logs.
ASKER
Ok
[2011/11/01 12:33:39.606734, 0] smbd/service.c:988(make_co nnection_s num)
canonicalize_connect_path failed for service Data, path /media/Datastore1/Data
This message is caused by the selinux settings.
You might want to read the next manual page and apply the settings to you Data directory.
See for details:
http://linux.die.net/man/8/samba_selinux
Then the cups error, is cups running or not..? it looks like it..
if it is running it should allow access from localhost.
[2011/11/01 12:33:39.606734, 0] smbd/service.c:988(make_co
canonicalize_connect_path failed for service Data, path /media/Datastore1/Data
This message is caused by the selinux settings.
You might want to read the next manual page and apply the settings to you Data directory.
See for details:
http://linux.die.net/man/8/samba_selinux
Then the cups error, is cups running or not..? it looks like it..
if it is running it should allow access from localhost.
ASKER
noci
I'm sorry I'm a newbie. I tried to run chon -t at command line but returned error 'bash command not found'.
Thanks
I'm sorry I'm a newbie. I tried to run chon -t at command line but returned error 'bash command not found'.
Thanks
chon should have been chcon (change context).
ASKER
chcon -f
I followed that instructions on the SElinux policy but I'm still having the same problem. May be I need to start the samba server config all over from scratch. I attached the log for your review.
Thanks log-smbd.txt
I followed that instructions on the SElinux policy but I'm still having the same problem. May be I need to start the samba server config all over from scratch. I attached the log for your review.
Thanks log-smbd.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can decide to disable samba selinux with:
setsebool -P smbd_disable_trans 1
and restart the samba server.
setsebool -P smbd_disable_trans 1
and restart the samba server.
Selinux will continue to be used, except for samba.
ASKER
I had to change SElinux to permissive mode, restart and I was able to open the folder. Though, I will look into security of the folder later.
Thanks
Thanks
Now you will see the exact failure in /var/log/audit....
look for type AVC records, with avc: denied
look for type AVC records, with avc: denied
For some one to be able to open a folder, they need eXecute permissions.
a permission of:
drwxr--r-- will only allow the owner to open the folder
drwxr-xr-x will allow owner, group and everyone
Use chmod (http://linux.die.net/man/1/chmod) to update permissions