LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   A writable share directory in samba XP Linux environment (http://www.linuxquestions.org/questions/linux-networking-3/a-writable-share-directory-in-samba-xp-linux-environment-799114/)

ethereal1m 03-31-2010 09:14 AM

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

jschiwal 04-01-2010 06:41 AM

Some configuration terms are synonymous. "Read Only = No" and "Writable = Yes" mean the same thing.

Sayan Acharjee 04-01-2010 06:49 AM

Quote:

Originally Posted by ethereal1m (Post 3919116)
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.

Sayan Acharjee 04-01-2010 07:00 AM

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

Quote:

#chmod o+rwx /shared_folder

devnull10 04-01-2010 07:12 AM

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.

Sayan Acharjee 04-01-2010 07:18 AM

Quote:

Originally Posted by devnull10 (Post 3920269)
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. :)

max egavga 04-01-2010 08:16 AM

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

jschiwal 04-01-2010 08:52 AM

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.

jschiwal 04-01-2010 08:52 AM

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.

ethereal1m 04-01-2010 09:06 PM

Code:

chmod -o+rwx
Ok, nice....that works :)
thanks guys

devnull10 04-02-2010 06:35 AM

Quote:

Originally Posted by sayan_acharjee (Post 3920274)
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! :)

Datsys 11-18-2010 07:27 PM

Quote:

Originally Posted by jschiwal (Post 3920363)
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?


All times are GMT -5. The time now is 12:41 PM.