Results 1 to 9 of 9

Thread: Samba creating odd temporary files

  1. #1

    Default Samba creating odd temporary files

    Can anybody help me?

    When i run a Windows executable from a windows machine that is located on a Mapped Drive on my Linux box (SuSE 11) i get a temp file created thats impossible to delete from a Windows machine! It can only be deleted from the Linux box logged in as root.

    Why is this and how can i resolve this issue, why is the temp file created and why is it not automatically deleted when the Win executable finnishes its job?

    I don't want hundreds of temp files to periodically delete!

    Any help appreciated.

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

    Default Re: Samba creating odd temporary files

    Quote Originally Posted by akwe-xavante View Post
    Can anybody help me?

    When i run a Windows executable from a windows machine that is located on a Mapped Drive on my Linux box (SuSE 11) i get a temp file created thats impossible to delete from a Windows machine! It can only be deleted from the Linux box logged in as root.

    Why is this and how can i resolve this issue, why is the temp file created and why is it not automatically deleted when the Win executable finnishes its job?

    I don't want hundreds of temp files to periodically delete!

    Any help appreciated.
    Can you please post the contents of your samba config file, smb.conf, and also the ownership and permissions on the Suse directory that is shared from Linux (e.g. do ls -l /path etc)
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  3. #3

    Default Re: Samba creating odd temporary files

    Contents of smb.conf:

    [global]
    workgroup = MSHOME
    name resolve order = bcast host lmhosts wins
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    logon path = \\%L\profiles\.msprofile
    logon home = \\%L\%U\.9xprofile
    logon drive = P:
    usershare allow guests = No
    domain logons = Yes
    domain master = Yes
    security = user
    winbind gid = 10000-20000
    winbind uid = 10000-20000
    netbios name = DevilsBackBone
    passdb backend = smbpasswd:/etc/samba/smbpasswd
    include = /etc/samba/dhcp.conf
    add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
    local master = Yes
    os level = 65
    preferred master = Yes

    [network]
    comment = NetworkShare
    inherit acls = Yes
    path = /network/
    read only = No
    guest ok = yes

    [netlogon]
    comment = Network Logon Service
    path = /network/
    write list = root
    guest ok = no
    read only = yes


    Owner and Permissions:

    drwxrwxrwx 3 root root 4096 date time network

    from the Linux command prompt Temp files created are named as follows filename.exeone.Identifier:$DATA with the ownership nobody nobody with permissions -rwxr--r--

    Viewing the contents of the mapped drive from a windows machine using Windows Explorer the temp file names are very different, the one above is named AUZ538~V and is unreadable and connot be found or deleted!

    All other files have the same ownership and permissions all are read writable by anybody, anybody can add / delete and read write to the mapped drive

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: Samba creating odd temporary files

    Suggest you backup smb.conf first so you can retrieve the situation if it blows up. Then try this:
    [network]
    comment = NetworkShare
    #inherit acls = Yes
    force user = root
    path = /network/
    read only = No
    guest ok = yes
    Forcing root is a diagnostic thing (temporary). If it improves, we would change that, but use it to see if it does improve. And clean our the temp files and see if they then correct themselves.

    and this, assuming that you don't want Suse to be a domain controller (don't change it if I assume wrongly):
    [global]
    workgroup = MSHOME
    name resolve order = bcast host lmhosts wins
    printing = cups
    printcap name = cups
    printcap cache time = 750
    cups options = raw
    map to guest = Bad User
    usershare allow guests = No
    security = user
    netbios name = DevilsBackBone
    passdb backend = smbpasswd:/etc/samba/smbpasswd
    local master = Yes
    os level = 65
    preferred master = Yes
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  5. #5

    Default Re: Samba creating odd temporary files

    Thank you this has sorted the temp file problem. Should i now uncomment the line: #inherit acls = Yes and remove: force user = root?

    Can you help me further?

    I did manage to get a prompt for UserName and PassWord and gave up because i could get it to work for either WinVista or WinXP but not both.

    Is there a way to get this working for both?

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

    Default Re: Samba creating odd temporary files

    Good practice suggests to take the ownership of the directory away from root. Suppose you have a user called "foogirl". Make the directory /network and all it's files to be owner=foogirl, group=users. Directory permissions world writable.
    Leave the inherit acls commented out or remove it
    Change force user = root to force user = foogirl
    Add foogirl to the Samba user database with this command:
    Code:
    smbpasswd -a foogirl
    Reboot and try again.

    If problems persist then please explain what this means:
    I did manage to get a prompt for UserName and PassWord and gave up because i could get it to work for either WinVista or WinXP but not both
    Plus: which way did you structure [global] in smb.conf?
    Plus: which version of Suse are you using
    Plus: what is the output from the console command rpm -qa *samba* where * means wild card
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  7. #7

    Default Re: Samba creating odd temporary files

    Thank you once more, done as suggested.

    I can now access the mapped drive from both WinVista and WinXP machines with a prompt for a UserName and PassWord.

    Thank you.

    I'm a lot happier now, your help is much appreciated.

  8. #8
    asheebeyle NNTP User

    Default Shoutout

    Id like a little help here please. If this is your first visit, you might want to take the time to read through this page inspired to look this up thank you..

  9. #9
    charliedavidson NNTP User

    Default Re: Samba creating odd temporary files

    Really helpful.. i was having same problem with temp files.. great thread!


    ______________________________________________________
    Criminal Background Check Online Information - Don't be a Victim

Posting Permissions

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