LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-18-2008, 11:02 PM   #1
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Rep: Reputation: 30
Using Samba to share files between Linux's


While I have used NFS to share and transfer files between Slackware
12.0 systems, I find it easier to use Samba (or cifs) to do this
since both machine's are dual boot windows/Linux. Sometimes I want
to share files between windows/windows, windows/linux and linux/linux.

All of these different scenarios seem to work quite well except
for file transfers between machines running linux. I often use
midnight commander as file manager/file transfer method and it usually
works quite well. However, after mounting a linux share on the current
linux machine, I cannot transfer files to the mounted filesystem. I can
transfer from the mounted filesystem or share to the machine I am working
on, but when transferring to the mount I get an error:

Code:
Can't chown .....  error(13)
Oddly enough, aborting the transfer results in the file being transferred
but with owner/group "nobody".

Having read several posts here, I can't seem to make out exactly what the
problem is but think it is probably something in the smb.conf file which
is actually setup mor for sharing with a windows machine than Linux.

Code:
[global]

   workgroup = HOME
   server string = Samba Server
   hosts allow = 192.168.1. 127.
   log level = 1
   log file = /var/log/samba.%m
   max log size = 50
   security = share
;   security = user
   name resolve order = bcast
   socket options = TCP_NODELAY 
   lm announce = yes
   local master = no
   dns proxy = no 
   null passwords = yes
   guest ok = yes
   guest account = nobody
;   invalid users = root
;   root = administrator
   printing = cups
   printcap name = cups
;  lock directory = /var/lock/samba

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   public = yes
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700

[root]
   comment = Root
   path = /
   read only = no
   browseable = yes
What additions do I need here to do away with this problem?

Or is it just something inherent to Midnight Commander?

No, I have not used cp to see if it works, but sftp works without
incident, although that is an entirely different situation.
 
Old 06-19-2008, 12:41 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Use security=user instead of security=share. Security=share is Windows 95 technology. When mounting a service use the "cifs" filesystem rather than smbfs. Smbfs is obsolete and will be dropped. Make sure that the username/passwords for Windows and Linux match. For each windows user, have a Linux user and use the "smbpasswd" program to map between the two. ( Or log in using the credentials of the user who owns the share )
A user of nobody means that the user accessing the service isn't authenticated. The "cifs" filesystem understands unix permissions. Even the setfacl and getfacl commands work.

Also, don't share the root directory in Linux and don't share the C: drive in Windows either. Years ago at work we had an outbreak of the "fun love" virus. It ended up being my job to disinfect the computers. While doing so, I noticed that the infected machines were sharing the C: drive. This is what allowed the virus to replicate. Either create a share such as /srv/samba/<dir-name>/ or perhaps your Document directory. Never allow write access to a system directory on the network.

Last edited by jschiwal; 06-19-2008 at 12:42 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Share files using Samba euro2004 Linux - Software 5 01-30-2006 04:54 PM
Cannot share files using samba on slack 10.1 alamuru420123 Slackware 7 03-22-2005 02:18 AM
Cannot create files on samba share jhoderd Linux - Software 2 01-04-2005 08:46 AM
Don't share .files with Samba objorkum Linux - Software 1 02-28-2004 07:48 AM
How could i hide some files in the share directory(samba) whepin Linux - General 1 12-20-2001 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration