##Windows as host(Using CIFS)
###Operations on Windows
Slect the folder you would like to share, then right-click, follow options as follow: select property, change to share tab, click share, then select user and authory. Finishing share by click share button.
###Operations on Linux
-
Install CIFS
sudo apt-get install cifs-utils -
Mounting shared folders
-
Create a mount point whereever you like, for example:
sudo mkdir /media/windows_share -
Add to configure file edit file
/etc/fstab, add a new line://windows_ip/share_folder /media/windows_shre cifs username=windows_user,password=windows_passwd,iocharset=utf-8,sec=ntl 0 0If you would like to do something in the shared folder(eg: compile a c program), you may encounter a fatal error:
Value too large for defined data type
You have to append
nounix,noserverinoto the fourth.
-
##Linux as host(Using ftp or samba) ###Sharing via ftp
-
Install vsftpd
sudo apt-get install vsftpd -
Configuring vsftpd Edit file
/etc/vsftd.conf, simply uncomment these lines to acquire read/write acess.annoymous_enable=NO local_enable=YES write_enable=YESMore options can be found in the file.
-
Start service
sudo service vsftpd start sudo chkconfig vsftpd onFirst command start vsftpd service, and the second enable service on startup.
-
On windows, you can access your linux
HOMEfolder via a ftp client or a browser.
###Sharing via samba
-
Install samba
sudo apt-get install samba samba-common -
add a samba user
sudo smbpasswd -a username -
Edit file
/etc/samba/smb.conf, simply uncomment these lines:[homes] comment = Home Directores browseable = yes writeable = yes -
Start service
sudo service smbd start sudo chkconfig smbd on - Check samba user with
pdbedit -Lv. - Right-click
computer, selectMap Network Drive, type server info\\server\shared_folderin theFolderbox, then type your smb user credential.
##Which is better Generally, ftp is faster than samba/CIFS1. However, samba and CIFS is more convenient. If you just have to transfer a very big file, ftp is better. If you have a limited storage or you are working on a ARM board, CIFS is the best choice.
Ref: