LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-31-2010, 08:14 AM   #1
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Rep: Reputation: 30
Question A writable share directory in samba XP Linux environment


Dear all,
I setup a connection between a Linux server and a windows XP client to share a common folder that located in the server that can be written by XP client user. So far the client can view files inside the folder but it can't edit them.

The following is the configuration of the folder (I only paste this part since the other part is too long) inside /etc/samba/smb.conf:
Code:
[share]
path = /share
writable = yes
public = yes
When I execute "testparm", I got:
Code:
[share]
path = /share
read only = No
guest ok = Yes
What did I miss in the configuration?

regards,
ethereal1m
 
Old 04-01-2010, 05:41 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Some configuration terms are synonymous. "Read Only = No" and "Writable = Yes" mean the same thing.
 
Old 04-01-2010, 05:49 AM   #3
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
Quote:
Originally Posted by ethereal1m View Post
Dear all,
I setup a connection between a Linux server and a windows XP client to share a common folder that located in the server that can be written by XP client user. So far the client can view files inside the folder but it can't edit them.

The following is the configuration of the folder (I only paste this part since the other part is too long) inside /etc/samba/smb.conf:
Code:
[share]
path = /share
writable = yes
public = yes
When I execute "testparm", I got:
Code:
[share]
path = /share
read only = No
guest ok = Yes
What did I miss in the configuration?

regards,
ethereal1m
Try adding browseable = yes in the specifications.
 
1 members found this post helpful.
Old 04-01-2010, 06:00 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
And also make sure if your shared folder has the necessary permissions. Use the following command:

Quote:
#chmod o+rwx /shared_folder

Last edited by Sayan Acharjee; 04-01-2010 at 06:09 AM.
 
1 members found this post helpful.
Old 04-01-2010, 06:12 AM   #5
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Rep: Reputation: 115Reputation: 115
What I did on my setup was create a directory /home/samba_share with permissions 770 , owner root, group samba_users. Then I add users to the group samba_users to allow them to access the directory and files within it.
 
1 members found this post helpful.
Old 04-01-2010, 06:18 AM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 590

Rep: Reputation: 64
Quote:
Originally Posted by devnull10 View Post
What I did on my setup was create a directory /home/samba_share with permissions 770 , owner root, group samba_users. Then I add users to the group samba_users to allow them to access the directory and files within it.
Allowing others to read, write, execute on the shared folder should make it work regardless of the owner and group permissions.
And yes it can be done in your way as well.
 
Old 04-01-2010, 07:16 AM   #7
max egavga
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
i am very new to linux.....
i had shared my folder (pictures) but every time i opened it on XP i need to confrigure it's perimission in ubuntu.....


is there any way so i dont need to confrigure anymore...for file sharing
 
Old 04-01-2010, 07:52 AM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It would be better to create a directory outside your home directory. To share a directory inside home the users you share with need read and execute permissions for your home directory. Look at adding a directory under /srv/samba/ if it exists or add a directory in /home/.

Also pay attention to your security mode. You may need to create Linux user accounts for the users and then use smbpasswd so they are in Samba's user database. You can create user accounts without home directories if that is what you need.

If the share is global, then you can allow guests Android use "Bad User = Nobody". A user who doesn't authenticate will access the share as the nobody user. This is the same as the Guest user in windows.
 
Old 04-01-2010, 07:52 AM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It would be better to create a directory outside your home directory. To share a directory inside home the users you share with need read and execute permissions for your home directory. Look at adding a directory under /srv/samba/ if it exists or add a directory in /home/.

Also pay attention to your security mode. You may need to create Linux user accounts for the users and then use smbpasswd so they are in Samba's user database. You can create user accounts without home directories if that is what you need.

If the share is global, then you can allow guests and use "Bad User = Nobody". A user who doesn't authenticate will access the share as the nobody user. This is the same as the Guest user in windows.

Last edited by jschiwal; 04-03-2010 at 03:09 AM. Reason: fixed Android annoying autocorrection. Android -> and
 
Old 04-01-2010, 08:06 PM   #10
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Original Poster
Rep: Reputation: 30
Code:
chmod -o+rwx
Ok, nice....that works
thanks guys

Last edited by ethereal1m; 04-01-2010 at 08:07 PM.
 
Old 04-02-2010, 05:35 AM   #11
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 547

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by sayan_acharjee View Post
Allowing others to read, write, execute on the shared folder should make it work regardless of the owner and group permissions.
And yes it can be done in your way as well.
Yes, but I wanted to restrict it to a specific set of users and not allow the whole world to delete my files!
 
Old 11-18-2010, 06:27 PM   #12
Datsys
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
It would be better to create a directory outside your home directory. To share a directory inside home the users you share with need read and execute permissions for your home directory. Look at adding a directory under /srv/samba/ if it exists or add a directory in /home/.

Also pay attention to your security mode. You may need to create Linux user accounts for the users and then use smbpasswd so they are in Samba's user database. You can create user accounts without home directories if that is what you need.

If the share is global, then you can allow guests and use "Bad User = Nobody". A user who doesn't authenticate will access the share as the nobody user. This is the same as the Guest user in windows.
As one who is so new to Linux that it hurts, I tried the last part of the above and it seemed to work to some degree. What I have found is that when I created the first share and copied some folders to it all the other shares were created having the same folders in them. In fact I notice that if I put something in one shared folder is shows up in all the others. How do I stop that from happening?
 
  


Reply

Tags
samba


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
Samba loginless share in domain environment ACiD GRiM Linux - Server 1 11-30-2009 07:20 PM
How to access samba share in a Windows domain environment qdog007 Linux - Software 6 02-28-2007 11:56 PM
Samba: Problem writing to a group-writable directory pschoenb Linux - Server 5 02-28-2007 06:34 PM
I can't write on share samba directory maal Linux - Software 10 12-18-2006 07:57 AM
samba share directory SchwipSchwap Linux - Newbie 1 05-18-2003 07:07 AM


All times are GMT -5. The time now is 08:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration