LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Folder permissions problem with Samba (http://www.linuxquestions.org/questions/linux-networking-3/folder-permissions-problem-with-samba-200039/)

albracco 07-01-2004 03:34 PM

Folder permissions problem with Samba
 
Have this Samba problem on 3 separate Red Hat 9.0 servers.

Create a public directory with all permissions open. Have problems when things get added to this public share:

1) User copies a folder from his local Windows PC to the share. Only that user can modify a file. Other users can read, but not write to the file.

2) User creates a new folder on the public share and copies some files into it. All users can read/write the files.

3) User creates a new empty folder on the public share. Only that user can create a file in that share, other users can not.

Is this a Samba or a umask problem?

TIA,

Al

ranger_nemo 07-01-2004 04:25 PM

When a user copies a file to the share, or creates a new file or directory on the share, the system sets the user.group of the new file to match the user. Look into using the various "force"s in the share...

"force user = whomever" forces any new file to be assigned to the user whomever.
"force group = whichever" does the same for the group.
"force create mode = ####" sets the permissions for any new file on the share.
"force directory mode = ####" does the same for any new directories on the share.

PS -- Don't cross-post the same question to several different forums... It's against the rules, and verboten. Some of the mods tend to get a bit upset about it.

jocast 08-19-2004 10:08 AM

a few questions
 
hi there, i have a few questions about this answer.
Where do i write those lines???
Is that whomever and whichever the names of my user and group or should i write the words whomever ans whichever?
Thank you

ranger_nemo 08-19-2004 11:23 AM

They go in the /etc/samba/smb.conf, under the share definition that you want them to apply to. If you have a share called wenus, and want all the files created in it to belong to the user bob, you would have something like...
Code:

[wenus]
        comment = Weekly Estimated Network Usage Sheets
        path = /home/data/wenus
        writeable = yes
        browseable = yes
        guest ok = no
        force user = bob


jocast 08-24-2004 10:09 PM

thanks ranger_nemo, it was very useful your answer. it worked


All times are GMT -5. The time now is 10:29 AM.