View previous topic :: View next topic |
Author |
Message |
mycroes Tux's lil' helper
Joined: 26 May 2003 Posts: 110 Location: Netherlands
|
Posted: Thu Dec 25, 2003 11:07 am Post subject: New files from other pc's with samba |
|
|
I run a server with samba on it which so the other users in my network can also do some stuff. I have three shared folders: /var/giFT, /var/www/localhost/htdocs & /tmp, of which I want at least each file in /var/giFT to be readable and writable by all other users. I use "security = share", with guest user 'smbuser' part of the 'smbgroup'. The way to solve the problem is by doing
Code: | chmod -R g+rw /var/giFT/ |
Can I make a kind of umask for one folder so every file will be written with rw group rights and owned by the 'smbgroup' group?
I want this for every file created, not only remotely created files, I noticed that when a samba user (in my case smbuser) creates a file on one of the shares it doesn't have group write permissions. Not a big problem as it's owned by the smbuser in that case though.
Greetings,
Michael _________________ In a world without walls or fences we don't need windows or gates |
|
Back to top |
|
|
DonHora n00b
Joined: 04 Sep 2003 Posts: 60 Location: Lyon, France
|
Posted: Thu Dec 25, 2003 5:11 pm Post subject: |
|
|
For 'giFT' share :
in your smb.conf you should have a share section [giFT]
put the 'force create mode' parameter in this section to force some file permission bits to 1. For directories the parameter is 'force directory mode' ('man smb.conf' to see how you must use it)
Then :
chgrp smbgroup /var/giFT
chmod g+s /var/giFT
and every file/directory created in /var/giFT will be owned by the smbgroup group. |
|
Back to top |
|
|
mycroes Tux's lil' helper
Joined: 26 May 2003 Posts: 110 Location: Netherlands
|
Posted: Thu Dec 25, 2003 11:56 pm Post subject: Not exactly |
|
|
Well this wasn't exactly what I meant, but it's a good thing The group doesn't really matter actually, as all clients are 'smbuser' so they have acces to the files as long as they are owned by smbuser or smbgroup. What I wanted was that files created by giFT would also be owned by the smbgroup, but if I start giFT as smbuser that should do
Greetings,
Michael _________________ In a world without walls or fences we don't need windows or gates |
|
Back to top |
|
|
DonHora n00b
Joined: 04 Sep 2003 Posts: 60 Location: Lyon, France
|
Posted: Fri Dec 26, 2003 10:43 am Post subject: Re: Not exactly |
|
|
mycroes wrote: | What I wanted was that files created by giFT would also be owned by the smbgroup, but if I start giFT as smbuser that should do
|
Code: | chgrp smbgroup /var/giFT
chmod g+s /var/giFT |
With this, every file or directory created in the /var/giFT directory by any process will be owned by the smbgroup group. It means that files created by Samba, by giFT or even by you with a 'touch test' will be owned by the smbgroup group.
I think it is exactly what you want. Please tell me if I didn't understand your post. |
|
Back to top |
|
|
mycroes Tux's lil' helper
Joined: 26 May 2003 Posts: 110 Location: Netherlands
|
Posted: Fri Dec 26, 2003 1:35 pm Post subject: dumb me |
|
|
Well that indeed is exactly what I want... I thought that only worked for files that were already in there... I'm actually quite new to Linux (think I'm using it for about an half year now) so I still have much to learn. You did understand me!
Merry Christmas (Yeah I'm late ) and a happy new year,
Michael _________________ In a world without walls or fences we don't need windows or gates |
|
Back to top |
|
|
mycroes Tux's lil' helper
Joined: 26 May 2003 Posts: 110 Location: Netherlands
|
Posted: Fri Dec 26, 2003 1:50 pm Post subject: Just tested |
|
|
Well I just tested it and it works great! Thanks again.
Greetings,
Michael _________________ In a world without walls or fences we don't need windows or gates |
|
Back to top |
|
|
|