LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-15-2007, 12:53 PM   #1
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Rep: Reputation: 30
Unhappy windows cannot read linux's shared folder


On my home network, when I first set things up, my windows computer was able to "see" my Linux computer and read the publicly shared folder.

Now it cannot read it at all. When I click on the directory from Windows, it tells me that it is not accessible and does not have permission.

I checked the folder in question on the Linux computer and the "Shared" tab is all *greyed* out and the "Not Shared" has been selected. How do I change this so that the Windows computer can read that public folder again?

I did have KDE 3.4.2 but now I have KDE 3.5.6 on SuSE 10.0.
 
Old 08-15-2007, 01:19 PM   #2
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
You using samba right?

What does the samba config file look like?

If you want a share to be publicly accessible by all computer on the network, it needs to look something like this:

smb.conf:
Code:
[global]
        workgroup = <workgroup name>
        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
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
        domain logons = No
        domain master = No
        netbios name = <computer name>
        security = share
        guest account = nobody

[<share name>]
        comment =
        path = <path to folder>
        browseable = yes
        read only = no
        guest ok = yes
        create mask = 0777
        directory mask = 0777
 
Old 08-15-2007, 01:37 PM   #3
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
Mine looks different:
Code:
[global]
	workgroup = <workgroup>
	printcap name = cups
	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:
	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
	domain master = No
	winbind gid = 10000-20000
	winbind uid = 10000-20000
	passdb backend = <passwd>
	restrict anonymous = no
	max protocol = NT
	ldap ssl = No
	server signing = Auto
	guest ok = yes
	domain logons = No
	idmap gid = 10000-20000
	idmap uid = 10000-20000
	security = user

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

## Share disabled by YaST
# [profiles]
#	comment = Network Profiles Service
#	path = /var/tmp
#	create mask = 0600
#	directory mask = 0700
#	case sensitive = no
#	msdfs proxy = no

[users]
	comment = All users
	path = /home/
	inherit acls = yes
	veto files = /aquota.user/groups/shares/
	write list = <username>
	case sensitive = no
	msdfs proxy = no

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @ntadmin,root
	force group = ntadmin
	create mask = 0664
	directory mask = 0775
	case sensitive = no
	msdfs proxy = no

[printers]
	printable = yes
	printer name = Epson
	use client driver = yes
	path = /printers

[<public folder>]
	path = /home/<username>/<public folder>

## Share disabled by YaST
# [netlogon]
I want the Windows machines to be able to read and copy from but not move from or write to the shared folder.

I'm using YaST to edit the Samba config file.
 
Old 08-15-2007, 02:01 PM   #4
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
Something like this then:

Code:
[global]
	workgroup = <workgroup>
	printcap name = cups
	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:
	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
	domain master = No
	winbind gid = 10000-20000
	winbind uid = 10000-20000
	passdb backend = <passwd>
	restrict anonymous = no
	max protocol = NT
	ldap ssl = No
	server signing = Auto
	guest ok = yes
	domain logons = No
	idmap gid = 10000-20000
	idmap uid = 10000-20000
	security = user
        guest account = nobody

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

## Share disabled by YaST
# [profiles]
#	comment = Network Profiles Service
#	path = /var/tmp
#	create mask = 0600
#	directory mask = 0700
#	case sensitive = no
#	msdfs proxy = no

[users]
	comment = All users
	path = /home/
	inherit acls = yes
	veto files = /aquota.user/groups/shares/
	write list = <username>
	case sensitive = no
	msdfs proxy = no

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @ntadmin,root
	force group = ntadmin
	create mask = 0664
	directory mask = 0775
	case sensitive = no
	msdfs proxy = no

[printers]
	printable = yes
	printer name = Epson
	use client driver = yes
	path = /printers

[<public folder>]
	path = /home/<username>/<public folder>
        browseable = yes
        read only = yes
        guest ok = yes


## Share disabled by YaST
# [netlogon]
 
Old 08-15-2007, 02:13 PM   #5
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
I edited it using a text editor and before I did that, I copied smb.conf to a backup (smb.conf.old) and then added what you said. I did not know how to issue a command for Samba to restart (I guessed that it might be necessary) so I rebooted the computer.

Unfortunately, Windows XP still cannot read the shared public folder. When I view the folder's properties in Konquerer, the Shared part is still greyed out.

Last edited by gymnart; 08-15-2007 at 02:33 PM.
 
Old 08-16-2007, 08:46 AM   #6
nightshade_1977
Member
 
Registered: Nov 2006
Location: Clarksville, VA
Distribution: Linux Mint, Ubuntu Server
Posts: 114

Rep: Reputation: 15
if your trying to make it so that anyone on your network can access this share make the following change
change
Quote:
security = user
to
Quote:
security = share
if you only want certain users to be able to access the share then you need to add samba users

Last edited by nightshade_1977; 08-16-2007 at 08:49 AM. Reason: cause I wanted to
 
Old 08-16-2007, 08:48 AM   #7
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
oh yes, and "security = share", i seem to overlooked that
 
Old 08-16-2007, 01:10 PM   #8
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
I just tried that and Windows still can't find my Linux computer. I still get that "the computer is unavailable" and "you don't have permission to access this computer" messages.

I'm beginning to wonder if this is not due to some security update somewhere?

Like I said, the Linux computer does not show up on the home network when viewing from the Windows XP computer but Samba has no problem with viewing and transferring files from the Windows computer to the Linux computer.

I still don't understand why when viewing the Public folder in Konquerer, the contents of the "Share" tab are greyed out and, like I said, the public folder is checked off as "Not Shared".
 
Old 08-16-2007, 01:15 PM   #9
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
What are the permissions on the public folder itself?
 
Old 08-16-2007, 01:30 PM   #10
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
Owner: Can View & Modify Content
Group: Can View
Others: Can view

Ownership: <me>
Group: Users

drwxr-xr-x
 
Old 08-16-2007, 01:39 PM   #11
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
I have also just noticed you don't have "netbios name = <computer name>" in your config file - Thats probably why windows can't see linux.
 
Old 08-16-2007, 01:56 PM   #12
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
Which computer's name should I put in for the netbios? Linux or the Windows? Anything else?
 
Old 08-16-2007, 02:02 PM   #13
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
Anything you like - but its the name that will be seen by clients connecting to your samba server (so basically whatever name you want to call linux in the network)
 
Old 08-16-2007, 02:14 PM   #14
gymnart
Member
 
Registered: Oct 2005
Distribution: SUSE 11.4
Posts: 331

Original Poster
Rep: Reputation: 30
Do I have to restart Samba or anything to see the changes take effect? If so, how do I do that?
 
Old 08-16-2007, 02:32 PM   #15
tjyorkshire
Member
 
Registered: Jun 2007
Location: UK
Distribution: openSUSE 10.2
Posts: 138

Rep: Reputation: 15
Samba should re-check the config file every minute, but to do it manually :

Code:
/etc/init.d/smb restart
 
  


Reply

Tags
folder, network, sharing, windows



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
Can't write to a shared folder from Windows XP machine Virtuality Linux - Networking 3 05-31-2007 02:49 AM
How can I mount a Windows XP shared folder? mlse Linux - Networking 3 09-28-2006 06:36 AM
how do i connect to a windows shared folder using samba? winstone5000 Linux - Networking 1 12-19-2005 10:38 AM
how to access a shared folder on a windows machine learnfast Linux - Newbie 11 03-12-2005 01:50 AM
problem writing to a shared windows folder doddy Linux - General 2 09-05-2002 06:43 PM

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

All times are GMT -5. The time now is 06:55 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
Open Source Consulting | Domain Registration