Hi,
I have Samba 3.6.23 and I am trying to get a share to be writeable from Windows machines. I can access the share from Windows but I am not able to write to the share regardless of what changes I make to the permissions.
The folder share is owned by the root user and the group samba. The user accessing the share from Windows is a member of the Samba group.
Folder permission is 755 and g+s
This is the configuration.
[SHARENAME]
comment = Share Name
path = /usr/share_name/
browseable = yes
public = yes
guest ok = yes
writeable = yes
create mask = 0655
directory mask = 2775
read only = no
map archive = yes
map system = yes
Any help is greatly appreciated.
Thanks,
Josh
Samba Share is Not Writable From Windows
Re: Samba Share is Not Writable From Windows
Did you see the section in the supplied /etc/samba/smb.conf?
Code: Select all
#---------------
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba-share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 3
- Joined: 2019/09/07 22:59:03
Re: Samba Share is Not Writable From Windows
@TrevorH - Thank you for reiterating this. I appreciate it. I did not run the samba-share_t before. I am tried to run this with the chcon command but Ia m getting errors.
I ran:
CentoOS Returns
I would appreciate any help in figuring out how to execute this.
Thanks!
I ran:
Code: Select all
chcon -tR samba-share_t /usr/share/
Code: Select all
chcon: failed to change context of `/usr/share/' to `unconfined_u:object_r:samba-share_t:s0': Invalid argument
Thanks!
Re: Samba Share is Not Writable From Windows
You can't use /usr/share as that's a system owned directory and owned by root:root. Share somewhere else.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 3
- Joined: 2019/09/07 22:59:03
Re: Samba Share is Not Writable From Windows
@TrevorH,
I am sorry if I am missing something simple.
I created a new folder called shares in / and made it owned by a new user called sambausr and added them to my samba group. Then I gave all the same permissions above. I tried the same commands with the new location (/shares/share) and I get the same error.
Is the issue the location of the folder or the permissions? Am I doing something else wrong?
I appreciate your clarification.
Thanks,
Josh
I am sorry if I am missing something simple.
I created a new folder called shares in / and made it owned by a new user called sambausr and added them to my samba group. Then I gave all the same permissions above. I tried the same commands with the new location (/shares/share) and I get the same error.
Is the issue the location of the folder or the permissions? Am I doing something else wrong?
I appreciate your clarification.
Thanks,
Josh