Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New files from other pc's with samba
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mycroes
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 110
Location: Netherlands

PostPosted: Thu Dec 25, 2003 11:07 am    Post subject: New files from other pc's with samba Reply with quote

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
View user's profile Send private message
DonHora
n00b
n00b


Joined: 04 Sep 2003
Posts: 60
Location: Lyon, France

PostPosted: Thu Dec 25, 2003 5:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
mycroes
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 110
Location: Netherlands

PostPosted: Thu Dec 25, 2003 11:56 pm    Post subject: Not exactly Reply with quote

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
View user's profile Send private message
DonHora
n00b
n00b


Joined: 04 Sep 2003
Posts: 60
Location: Lyon, France

PostPosted: Fri Dec 26, 2003 10:43 am    Post subject: Re: Not exactly Reply with quote

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
View user's profile Send private message
mycroes
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 110
Location: Netherlands

PostPosted: Fri Dec 26, 2003 1:35 pm    Post subject: dumb me Reply with quote

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! :D
Merry Christmas (Yeah I'm late :roll: ) and a happy new year,

Michael
_________________
In a world without walls or fences we don't need windows or gates
Back to top
View user's profile Send private message
mycroes
Tux's lil' helper
Tux's lil' helper


Joined: 26 May 2003
Posts: 110
Location: Netherlands

PostPosted: Fri Dec 26, 2003 1:50 pm    Post subject: Just tested Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum