6

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

4
  • 10
    Sharing the root of your filesystem of any operating system, Windows, Unix, Mac, BeOS.. is a huge security issue and could potentially cause problems later on. You're allowing anyone with the given username/password to spelunk the entire contents of the disk. Please re-consider what you're trying to do, and then allocate shares appropriately.
    – lazyPower
    Sep 8, 2011 at 14:50
  • 2
    Writing to root (/) 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.
    – Lekensteyn
    Sep 8, 2011 at 15:00
  • 4
    @lazyPower Thanks. But I know what I'm doing, It's a testing box used to learning.
    – lovespring
    Sep 9, 2011 at 3:22
  • What does the $ in root$ mean?
    – traisjames
    Dec 10, 2021 at 11:56

2 Answers 2

5

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.

2

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.

2
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – user98085
    Jun 11, 2013 at 22:06
  • Ok, I edited my answer.
    – djangofan
    Jun 13, 2013 at 21:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .