LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Shared folder permissions (https://www.linuxquestions.org/questions/linux-software-2/shared-folder-permissions-469110/)

cvzyl 07-30-2006 09:19 AM

Shared folder permissions
 
How should I set permissions on a folder that I want to share across my local network? I have activated Samba and added the folder to the shared folders list. I can see the folder from my WinXP machine but when I click on it to open it I get asked a username and password. What should this be? Should I create a special user with permission on the folder on the Linux box? I tried entering my login info (username and password) that I use to log into my Linux machine but it is rejected.

This is probably a very stupid question but I am still learning.

Thank you.
Cobus

jschiwal 07-30-2006 09:43 AM

You could use the "smbpasswd" program to create a samba user and password. The folder should also have permissions set so that the owner can read & write to it.

A lot depends on how samba is configured. You could as an alternative use ForceOwner and ForceGroup in your smb.conf file. The details should be in /usr/share/doc/packages/samba/Samba3ByExample.pdf. ( Might be a postscript file on your system ). Look at example 2.2. This is what you could do if you want this share accessible by everyone.

If you want everyone to be able to read files in this share, but not write to them, then look at example 2.1.
It has what may be the simplest smb.conf that you have ever seen!
Code:

[global]
      workgroup = MIDEARTH
      security = SHARE
     
[Plans]
      path = /plans
      readonly = Yes
      guest ok = Yes

Your share & directory will probably have a different name. The modes of the directory should be 0755 in this example. Your /etc/hosts file should contain your servers name and IP address, and every host should be configured for the same workgroup (MIDEARTH in this example) and be in the same network segment, e.g. 192.168.0/24.

Good Luck!


All times are GMT -5. The time now is 09:54 AM.