Hi, It's not that often that I'm messing around with Samba but I have a dilemma that I need some help with. I have a share called "common", users can create folders and files just fine but I'm wondering if it's possible to force folders/files to be created with certain user/group owner in just that specific folder. I not I can force so that everything is created with a specific user/group, but I want it specific to folders. Lets say I create a file in "/common/" and it will be created with the owner that I'm logged in as, lets say the user "john". But if John, or anyone, creates a file in "/common/files/" I want it to be created with the owner "james" no matter who creates it. Is this possible to achieve? The reason I need this is because I have a Samba share with all our www/ftp folders and they are owned by the user that's has the FTP-account for that specific folder. If I create a folder or whatever it will change the permission so that the FTP-user can't edit/delete it. I don't really want to chmod 777 on everything in there. If it's not possible, how do people mange this? Or should I not make a Samba share like this? Thanks, -Patric
On 08/29/2013 04:40 AM, Patric Falinder wrote:> Hi, > > It's not that often that I'm messing around with Samba but I have a dilemma > that I need some help with. > > I have a share called "common", users can create folders and files just > fine but I'm wondering if it's possible to force folders/files to be > created with certain user/group owner in just that specific folder. > I not I can force so that everything is created with a specific user/group, > but I want it specific to folders. > > Lets say I create a file in "/common/" and it will be created with the > owner that I'm logged in as, lets say the user "john". > But if John, or anyone, creates a file in "/common/files/" I want it to be > created with the owner "james" no matter who creates it. > > Is this possible to achieve? > > The reason I need this is because I have a Samba share with all our www/ftp > folders and they are owned by the user that's has the FTP-account for that > specific folder. If I create a folder or whatever it will change the > permission so that the FTP-user can't edit/delete it. I don't really want > to chmod 777 on everything in there. > > If it's not possible, how do people mange this? Or should I not make a > Samba share like this? > > Thanks, > -Patric >Use group permissions? -- -Eric 'shubes'
TAKAHASHI Motonobu
2013-Aug-29 16:32 UTC
[Samba] Force user permission in specific folders
From: Patric Falinder <patric.falinder at omg.nu> Date: Thu, 29 Aug 2013 13:40:01 +0200> It's not that often that I'm messing around with Samba but I have a dilemma > that I need some help with. > > I have a share called "common", users can create folders and files just > fine but I'm wondering if it's possible to force folders/files to be > created with certain user/group owner in just that specific folder. > I not I can force so that everything is created with a specific user/group, > but I want it specific to folders.Please use "force user" and "force group" parameters. --- TAKAHASHI Motonobu <monyo at monyo.com> / @damemonyo facebook.com/takahashi.motonobu
So I found a solution that will work for me. inherit owner = yes On Thu, Aug 29, 2013 at 1:40 PM, Patric Falinder <patric.falinder at omg.nu>wrote:> Hi, > > It's not that often that I'm messing around with Samba but I have a > dilemma that I need some help with. > > I have a share called "common", users can create folders and files just > fine but I'm wondering if it's possible to force folders/files to be > created with certain user/group owner in just that specific folder. > I not I can force so that everything is created with a specific > user/group, but I want it specific to folders. > > Lets say I create a file in "/common/" and it will be created with the > owner that I'm logged in as, lets say the user "john". > But if John, or anyone, creates a file in "/common/files/" I want it to be > created with the owner "james" no matter who creates it. > > Is this possible to achieve? > > The reason I need this is because I have a Samba share with all our > www/ftp folders and they are owned by the user that's has the FTP-account > for that specific folder. If I create a folder or whatever it will change > the permission so that the FTP-user can't edit/delete it. I don't really > want to chmod 777 on everything in there. > > If it's not possible, how do people mange this? Or should I not make a > Samba share like this? > > Thanks, > -Patric >