I just can make it readable, don't know how to make it writeable
[root$]
path = /
create mask = 0755
valid user = myname
browsable = yes
P.S. what's the create mask ? and I'm using ubuntu server 11.0
By default, your Samba users are not going to have write access to the filesystem root. The easiest way to do this is to force a user. (Samba users will access the share using the local user's privileges.) Make sure that the user you specify has ownership and/or appropriate file system permissions. For ease of use in my example, I'm using root.
[root$]
path = /
create mask = 0755
force user = root
browsable = yes
To answer your second question, the create mask is the default permissions that will be assigned to any file or directory created on the share by a Samba user.
Here is a quick start on SMB2 with Samba 4.x . If you scroll down a little from that link, there is a section that gives a samba.conf example for an office share. Here is the smb.conf snippet:
# Global parameters
[global]
workgroup = MIDEARTH
netbios name = OLORIN
printcap name = cups
disable spoolss = Yes
show add printer wizard = No
printing = cups
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[public]
comment = Data
path = /export
force user = maryo
force group = users
read only = No
NOTE: Don't know if it matters, but keep in mind that Windows XP does not support SMB2 and so you may have some config variance here for computers that are using Windows XP or Macintoshes prior to this summers 'Mavericks' OSX release.
/
) requires root privileges which is a bad idea for network services, especially in this case. Is there a particular reason why allowing write access to/home/youruser
(or/var/www
for that matters) is not enough? Keep in mind that even reading stuff as root allows users to read passwords from/etc/shadow
.