Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: Samba to Win7 - Help!

  1. #1

    Default Samba to Win7 - Help!

    Hi everyone im new here and am in need of some help.
    Im trying to setup samba so that i can copy some files from my windows 7 machine over to the drive on the opensuse machine running 11.2. i believe i set everything how it should be set up but no matter what i do i cant write filesfrom the windows machine.

    Here is my smb.conf

    # smb.conf is the main Samba configuration file. You find a full commented
    # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
    # samba-doc package is installed.
    # Date: 2009-10-27
    [global]
    workgroup = JCHOUSEHOLD
    netbios name = JC-BckupSrv
    name resolve order = bcast host lmhhost wins
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    include = /etc/samba/dhcp.conf
    #logon path = \\%L\profiles\.msprofile
    #logon home = \\%L\%U\.9xprofile
    #logon drive = P:
    usershare allow guests = Yes
    usershare max shares = 100
    usershare owner only = False
    wins support = No
    security = user

    ## Share disabled by YaST
    # [homes]
    # comment = Home Directories
    # valid users = %S, %D%w%S
    # browseable = No
    # read only = No
    # inherit acls = Yes

    # [profiles]
    # comment = Network Profiles Service
    # path = %H
    # read only = No
    # store dos attributes = Yes
    # create mask = 0600
    # directory mask = 0700

    ## Share disabled by YaST
    # [users]
    # comment = All users
    # path = /home
    # read only = No
    # inherit acls = Yes
    # veto files = /aquota.user/groups/shares/

    ## Share disabled by YaST
    # [groups]
    # comment = All groups
    # path = /home/groups
    # read only = No
    # inherit acls = Yes

    ## Share disabled by YaST
    # [printers]
    # comment = All Printers
    # path = /var/tmp
    # printable = Yes
    # create mask = 0600
    # browseable = No

    ## Share disabled by YaST
    # [print$]
    # comment = Printer Drivers
    # path = /var/lib/samba/drivers
    # write list = @ntadmin root
    # force group = ntadmin
    # create mask = 0664
    # directory mask = 0775

    [Bckups]
    comment = Bckup-Srv
    path = /Windows7
    read only = No
    writeable = Yes
    guest ok = yes
    available = yes
    public = yes
    browsable = yes
    Last edited by caf4926; 15-May-2010 at 20:27. Reason: add to title

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,721
    Blog Entries
    20

    Default Re: Samba to Win7 - Help!

    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,716
    Blog Entries
    2

    Default Re: Samba to Win7 - Help!

    I don't understand the nature of the problem. You've given inadequate detail. Let me try to interpret what you said: Is it that you can see the windows 7 computer in your network browser called Dolphin and you can click the icon for the windows 7 computer and then drill down in Dolphin and see the icon for the share on the windows 7 machine and when you click that icon you get an error message? Is that it?
    Leap 42.2 & Leap 42.3 [&KDE]
    FYIs from the days of yore

  4. #4

    Default Re: Samba to Win7 - Help!

    sorry for not being clear.
    I have a machine running opensuse 11.2 gnome (so its nautilus) and on it i placed a second drive which i want to use to backup my data from my windows 7 machine. the issue is that i can see the folders and drill down into it however no matter what i do on the opensuse side i can't seem to write anything into the drive from the windows side. it says i dont have write permissions.

    Also i cant seem to edit my original post...

  5. #5
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,716
    Blog Entries
    2

    Default Re: Samba to Win7 - Help!

    You're right, it's a permissions problem. I suspect that you've mounted an NTFS drive/partition into the directory /windows7. If it's an NTFS partition then it's likely that it's mounted to allow only the Linux root user to write into it. So that would need to be changed (if I'm correct that it's been mounted as root-only write access). But it might be a Linux partition and not NTFS.

    Based on your stanza for [Bckups] in smb.conf, I think that you want simple write access for any user on the LAN to the directory /windows7. There are several ways to do that, here's one of them:

    You can arrange for all the files and directories in /windows7 to belong to a non-root Linux user e.g. timothy and to be readable and writable by everyone on the computer and everyone on the LAN. Let me know if you want it to be more restrictive.

    Change the smb.conf stanza to this form:
    Code:
    [Bckups]
    comment = Bckup-Srv
    path = /Windows7
    read only = No
    guest ok = yes
    force user = timothy
    I'll use timothy as your Linux username. Change it to your correct username in what I write.

    OK, that's the Samba side of the permissions fixed. Now for the Linux side of the permissions. This is handled differently if the partition is NTFS or Linux filesystem (e.g. ext3, ext4 etc).

    Possibility one: the drive partition is not an NTFS partition
    Run these two commands from a terminal window:
    • sudo chown -R timothy:users /Windows7
    • sudo chmod -R 755 /Windows7

    Now all the contents, old or new, in the directory will be owned by timothy -- this is a tidy thing from a Linux administrative standpoint.

    Possibility two: the drive partition is an NTFS partition
    In this case change the mount by editing it in the file that controls how drives are mounted. The file is "fstab" at /etc/fstab. You can look at it and/or edit it with this command run from a terminal:
    Code:
    gnomesu gedit /etc/fstab
    There'll be a line there for the NTFS drive sort of like this one from my computer:
    /dev/etc_etc /Windows7 ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
    You edit only this string from the line:
    Code:
    users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8
    and change it to this form:
    Code:
    uid=timothy,gid=users,umask=0022
    so that the line ends up like this:
    /dev/etc_etc /Windows7 ntfs-3g uid=timothy,gid=users,umask=0022 0 0
    After that a reboot will change the permissions and ownership to timothy. FYI this ownership is only an artifice that holds for Linux. If you take the drive out and stick it in a windows computer, the ownerships revert conveniently and automagically correctly to a windows form.

    Try that -- simple isn't it

    References:
    HowTo Mount NTFS Filesystem Partition Read Write Access in openSUSE
    Samba HowTo Configure a Professional File Server on a SOHO LAN
    Notes on chown and chmod
    Last edited by swerdna; 16-May-2010 at 14:00.
    Leap 42.2 & Leap 42.3 [&KDE]
    FYIs from the days of yore

  6. #6
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,716
    Blog Entries
    2

    Default Re: Samba to Win7 - Help!

    There's one caveat. If this piece"locale=en_GB.UTF-8" is different for you in fstab, let me know.
    Leap 42.2 & Leap 42.3 [&KDE]
    FYIs from the days of yore

  7. #7
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,716
    Blog Entries
    2

    Default Re: Samba to Win7 - Help!

    Quote Originally Posted by abc20000 View Post
    .........

    Also i cant seem to edit my original post...
    I'm not sure of the time available before it shuts off (locks), maybe 10 minutes or there abouts.
    Leap 42.2 & Leap 42.3 [&KDE]
    FYIs from the days of yore

  8. #8

    Default Re: Samba to Win7 - Help!

    um actually the drive mounted as /Windows7 is a FAT32.
    Does all this still apply?

  9. #9
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,716
    Blog Entries
    2

    Default Re: Samba to Win7 - Help!

    Yes except the detail is marginally different. Paste here the line from fstab and I'll tell you what to put in its place.

    Reference: openSUSE: HowTo set disk access permissions for Fat32 (VFAT) on a desktop PC
    Leap 42.2 & Leap 42.3 [&KDE]
    FYIs from the days of yore

  10. #10

    Default Re: Samba to Win7 - Help!

    This is the fstab file:
    thanks for all the help, there's so much to learn..



    /dev/disk/by-id/ata-Maxtor_5T020H2_T2JAQYDC-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-Maxtor_5T020H2_T2JAQYDC-part1 / ext4 acl,user_xattr 1 1
    /dev/disk/by-id/ata-Maxtor_5T020H2_T2JAQYDC-part3 /home ext4 acl,user_xattr 1 2
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    /dev/disk/by-id/ata-ST3160815A_9RA1E7D5-part1 /Windows7/Bckups vfat users,gid=users,umask=0002,utf8=true 0 0

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •