I am trying to create a SAMBA share on an openSUSE 12.2 system in which files can be created, modified and deleted by any user on both Windows systems as well as Linux systems. I have achieved full access from Windows, but am unable to change file permissions. For Linux I have been able to mount the share and have read access to the files produced by Windows, but am unable to create files, or modify/delete them. Can the general shared access I seek from Windows/Linux systems be achieved by suitable settings of SAMBA parameters and file permissions, and if so how should these be set? As the files are for general access I’ve been using ‘nobody’ as directory owner and the SAMBA guest account. Hope you can help - it’s been driving me mad!
I have two blogs on the subject. The ability to read and write from a partition is dependent on its settings in the fstab file. If only a certain user can write somewhere, then Samba will work the same way, so I often setup a common NTFS partition that everyone can write to outside of /home and then share that as opposed to trying to let Joe from PC 1 write to Johns /home area on PC 2. You must consider write permissions in what ever you decide to do. Here are my blogs on the subject:
For easy edits of your fstab file, look here:
And for Write Permissions of files and folders, have a look here:
Mkae a directory named “share” somewhere e.g. /path_to/share
Chown the directory to be owned by some arbitrary Linux user e.g. barack: sudo chown -R barack:users /path_to/share
Chmod it to be a normal directory: sudo chmod -R 755 /path_to/share
Put this stanza into the config file for samba (smb.conf):
[SOMENAME] path = /path_to/share guest ok = yes force user = barack read only = no
IIRC that will allow everyone unfettered access, without needing credentials (logins).
I’ve assumed that the share is not located on an NTFS or FAT partition. If it is, you’d have an additional factor to adjust, but I won’t talk about that so as not to complicate things.
Reference for all sorts of share structures: Defining and Using File Shares
Reference for Notes on chown and chmod