LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Change access settings of directories shared from Linux Server-samba (https://www.linuxquestions.org/questions/linux-server-73/change-access-settings-of-directories-shared-from-linux-server-samba-911624/)

jufo 11-03-2011 06:25 AM

Change access settings of directories shared from Linux Server-samba
 
Hello. Please help.

1. How will i know who are the authorized windows pc users that can access the folder shared from a linux server-samba? how to display list of them? what command? I am struggling through ssh only..
2. How will i change their access rights to the folder? if i only want them to access the file as read-only, or write or read and write???
(i am trying to configure this linux server using PUTTY or SSH only)
Thank you. :)

sswuste 11-05-2011 05:32 PM

Both questions can not be answered without more knowlegde about your system. But you can check the /etc/samba directory and look in the smb.conf file. Here you can allow and deny certain users/ip-adresses.

EXAMPLE

[global]
debuglevel = 1
workgroup = Workgroup
netbios name = OURFILESERVER
security = share
disable spoolss = Yes
show add printer wizard = No
printing = cups
load printers = yes
hosts allow = 127.0.0.1 192.168.1.0/24 192.168.1.110 78.206.93.2 72.163.17.253
hosts deny = 0.0.0.0/0

[specialdocuments]
comment = Specails
path = /var/specialdocuments
read only = No
guest ok = yes


[readonlydocuments]
comment = olddata
path = /var/olddata
read only = Yes
guest ok = yes

deep27ak 11-07-2011 12:07 AM

Quote:

Originally Posted by jufo (Post 4514748)
Hello. Please help.

1. How will i know who are the authorized windows pc users that can access the folder shared from a linux server-samba? how to display list of them? what command? I am struggling through ssh only..
2. How will i change their access rights to the folder? if i only want them to access the file as read-only, or write or read and write???
(i am trying to configure this linux server using PUTTY or SSH only)
Thank you. :)

In the smb.conf check for the entry of file which has been shared

Code:

[share]
users = user1 user2 user3
read only = yes
writable = yes

change the options as per your requirements

for permissions on individual folders
give related permissions using

Code:

#chmod 755 (dir_name)

jufo 11-11-2011 05:16 AM

@sswuste: Thanks for your reply. Now i understand the concept on how to set those permissions.. :)

@deep27ak: Thank you also for your answer. But where should i put this???

Code:
#chmod 755 (dir_name)


Let us say i have to share those individual folders with it subfolders in diff access combination (read, write, read and write). In what portion should i put this code??? How does it affect the permission for each user??? Thanks :)

jufo 11-18-2011 05:10 AM

It is all clear now. Sorry if i have to ask you without even searching the net.Thank you very much!


All times are GMT -5. The time now is 07:21 AM.