LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2011, 05:04 AM   #1
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Rep: Reputation: 17
File Sharing Error between Window 7 and Ubuntu 11.04 system


Dear forum members,
I have a ubuntu 11.04 system and a lappy with window 7 system on it.I have got samba set up on the ubuntu system so that file sharing is enable between them.However,when I put my files in my samba share and access it from the window 7 laptop.I got some errors as per attach files.I like to know the solution to solve the problems.

Appreciate all the help given
Thanks
JQ
Attached Thumbnails
Click image for larger version

Name:	Error Message Copy from Window 7 to Ubuntu 11.04.jpg
Views:	24
Size:	143.4 KB
ID:	7404   Click image for larger version

Name:	Ubuntu 11.04 Samba Share Folder Settings.png
Views:	26
Size:	153.1 KB
ID:	7405  
 
Old 06-26-2011, 07:16 AM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

probably it's something with the permissions in Samba/linux folder, try give all the files for start "chmod 777" and see what will happen.
Then try to configure your Samba share to allow anyone in the folder to R/W:
Code:
# This one is useful for people to share files
[Shared folder]comment = Shared folder  <--- change this name Shared folder to whatever you want
   path = /path/to/folder
   read only = no
   browseable = yes
   writable = yes
   guest ok = yes
   public = yes
and I hope you will not get any errors anymore (I presume that the Shared folder has also 777).

Good luck
 
Old 06-26-2011, 08:02 AM   #3
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi,
I type chmod 777 into terminal and the below error appear.

dell@Dell-Vostro-200:~$ chmod 777
chmod: missing operand after `777'
Try `chmod --help' for more information.
dell@Dell-Vostro-200:~$

I have got SWAT install for web administration for Samba.Below is the config files.Where do I out the config that you mention?

# Samba config file created using SWAT
# from UNKNOWN (10.1.1.3)
# Date: 2011/06/26 20:01:01

[global]
workgroup = WORKHOME
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
username map = /etc/samba/smbusers
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
read only = No
guest ok = Yes

[Documents]
path = /home/dell/Documents
read only = No
guest ok = Yes

[Pictures]
path = /home/dell/Pictures
read only = No
guest ok = Yes

Appreciate your reply
Thanks
 
Old 06-26-2011, 12:31 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Let's just first establish which directory do you want to share/allow access to
I will take your:
[Documents]
path = /home/dell/Documents

then you FIRST change to that dir or somehow select it and then do the "chmod 777 *" <-- * means every file in that directory, but if you have any subdirs in it then use "chmod -R 777 *" (but first you have to change the current directory to the one you want to do this operation in it - let's presume "cd /home/dell/Documents")

then put the
Code:
[Documents]comment = Documents  <--- change this name to whatever you want as it will appear in the Network neighbourhood
   path = /path/to/folder
   read only = no
   browseable = yes
   writable = yes
   guest ok = yes
   public = yes
after the [Pictures] definitions
path = /home/dell/Pictures
read only = No
guest ok = Yes



If you find the message helpful, or you approve what is posted, click the "Add to Reputation" button, on the left of the post.

Last edited by lithos; 06-26-2011 at 12:40 PM.
 
Old 06-27-2011, 10:23 AM   #5
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi,
1.How do I do the chmod?

2.As for the config, do I open a terminal to open the config file or can I insert the config using swat?

Sorry
Thanks
 
Old 06-27-2011, 11:28 AM   #6
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
I not familiar with GUI in linux
so,
1. to do the "chmod" open Xterm (terminal window) and do it like written (be careful in which directory you are - check with pwd in command line, it will display you where you are
Code:
/etc/samba#>pwd
/etc/samba
)
2. I'm not familiar with swat either so my recommendation would be to change the Samba settings to that directory (on your picture below attached) like:
- leave Owner - Create / delete
- change Group -> Create/delete
- change Others -> Create/delete
it will be probably the same as if you would put the config lines written above in post #4, if not, then in terminal edit the "/etc/samba/smb.conf" file and insert the lines
Code:
vi /etc/samba/smb.conf
... paste the lines ...

exit with ESC key then,
:x <enter> (that is a colon and x - meaning save and exit)
restart samba (? service smb restart ?)
Attached Thumbnails
Click image for larger version

Name:	samba-1.jpg
Views:	8
Size:	47.6 KB
ID:	7415  

Last edited by lithos; 06-27-2011 at 11:30 AM.
 
Old 07-02-2011, 02:13 AM   #7
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi lithos,
I am sorry for the late reply.I got this error as below when opening /etc/samba/smb.conf. Will there be any problem?

(gedit:3232): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.O33WXV': No such file or directory

(gedit:3232): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:3232): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.BIUMXV': No such file or directory

(gedit:3232): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:3232): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.YZ8NXV': No such file or directory

(gedit:3232): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory



I have put the new config files as below, is that correct

[Documents]
path = /home/dell/Documents
read only = no
writeable = yes
; browseable = yes
guest ok = yes
public = yes

Appreciate your reply.
Thanks
 
Old 07-02-2011, 03:36 AM   #8
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi lithos,
After inserting the new config files as below,I am able to copy,paste and cut from the ubuntu desktop to the window 7 laptop without the permission problem.

[Documents]
path = /home/dell/Documents
read only = no
writeable = yes
; browseable = yes
guest ok = yes
public = yes


But I see another problem which I hope u can explain to me. When I copy a file from my ubuntu desktop to be share with my window 7 laptop,a lock icon on the file will appear.Is that normal?But I can copy,cut and paste the file from the desktop to the laptop without any problem.Is that all right?

Appreciate your reply

Last edited by GJQ; 07-02-2011 at 12:48 PM.
 
Old 07-02-2011, 12:55 PM   #9
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
if it's ok with you to let the operations on the files (read/write/cut.. delete ?) than it's ok nevermind the lock icon.
but I'm not familiar with Gtk nor Ubuntu so my suggestions are limited.

maybe someone familiar with Ubuntu could help more.
 
Old 07-09-2011, 01:54 PM   #10
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi Lithos,
Sorry to trouble u again.Some failure on my system and I have to reinstall my whole system.After getting done,I install samba and re-set up my share folders.My problem is that I cannot share the folders that are out of the user Home Directory.As I have 2 HDD on my system, most of the data are in the 2nd HDD which ubuntu name it as New Volume.I see an advise as per link attach http://ubuntuforums.org/showthread.php?t=490058 but I do not know understand how to do it.

Appreciate your help.
 
Old 07-09-2011, 04:09 PM   #11
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Well, that would be hard to guess how to make it done (I'm not into Ubuntu, sorry)
but the basics would be to share that directory with new [Documents] section , which you should add to the existing, like:
Code:
[Old-Documents]
   comment = Old-Documents  <--- change this name to whatever you want as it will appear in the Windows Network neighbourhood
   path = /path/to/folder   <--- this should be your new directory you want to share on the 2nd HDD "New Volume", be sure it's mounted (cmd: mount)
   read only = no
   browseable = yes
   writable = yes
   guest ok = yes
   public = yes
I hope you will get it done.

Last edited by lithos; 07-09-2011 at 04:11 PM.
 
Old 07-17-2011, 06:44 AM   #12
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi lithos,
Below is the solution for the problem I face on file sharing between the window 7 laptop and ubuntu system.

The second harddisk is not mounted automatically on the Ubuntu Desktop System on start up.Therefore I will need to open Terminal and key in the below code.

sudo mkdir /media/MyData

Then edit the file /etc/fstab and add these two lines at the bottom of the file:

sudo gedit /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=aef3a1b7-3b44-4c2a-a39f-68c2edf7aac8 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=27bb60cc-31cd-44d0-86b5-e658b2ed2714 none swap sw 0 0
# MyData <---- (ADD THIS LINE)
UUID=84a6e4c2-2ad4-4b96-b924-8575279487ae /media/MyData ext4 defaults,noatime 0 2 <---- (ADD THIS LINE)

Save and Exit.
Reboot your system. The "New Volume(2nd Harddisk)" partition will be mounted on /media/MyData.

Now open Nautilus and try to share a folder.Ubuntu will now install the required packages for the file sharing and things will be able to work.In case the instruction is not clear,please found attach link http://ubuntuforums.org/showthread.php?p=11031371 for the solution.

Thank you very much for all the help render.
 
Old 07-17-2011, 08:29 AM   #13
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi

I'm glad you could make the solution working and hopefully for future readers will find it too.

Tnx for reporting it back.
 
Old 07-17-2011, 09:49 AM   #14
GJQ
Member
 
Registered: Jun 2009
Location: Malaysia
Distribution: Ubuntu 11.04
Posts: 93

Original Poster
Rep: Reputation: 17
Hi lithos,
I hope Linux will be running on every desktop one day.Imarmisa over at Ubuntu Forum is the one that help me to get it to work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
File Sharing between Window 7 Starter and Ubuntu system running 10.04LTS and 11.04 GJQ Linux - Newbie 4 06-08-2011 11:23 AM
[SOLVED] Dual boot Ubuntu and Win 7. No root file system is defined error Tomorrows_Gone Linux - Newbie 3 05-09-2011 12:07 AM
SAMBA FILE SHARING ISSUE WINDOW XP application hangs frequently salimshahzad Linux - Newbie 1 01-21-2011 05:02 PM
File System sharing digitolx Fedora 3 11-06-2009 12:55 PM
error no file system when installing ubuntu fullmetaljacket Linux - Newbie 2 05-19-2008 12:52 PM


All times are GMT -5. The time now is 07:38 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration