<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Sambafilter</title>
	<link>http://ask.metafilter.com/83537/Sambafilter/</link>
	<description>Comments on Ask MetaFilter post Sambafilter</description>
	<pubDate>Wed, 13 Feb 2008 09:10:13 -0800</pubDate>
	<lastBuildDate>Wed, 13 Feb 2008 09:10:13 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Sambafilter</title>
		<link>http://ask.metafilter.com/83537/Sambafilter</link>	
		<description>Issue with Samba (on Ubuntu) file sharing and ownership of files. How do I set it so the ordinary user will not take ownership when saving over a file? (more details inside) &lt;br /&gt;&lt;br /&gt; Environment: about 20 windows client computers connecting to an Ubuntu Samba server. The Ubuntu box is mainly administered through Webmin and users are added with the &quot;users and groups&quot; module in webmin and when users are created in there, they are also created in the Samba users module.&lt;br&gt;
&lt;br&gt;
Backups are made on one of the workstations with Acronis True Image Workstation to an external hard drive.&lt;br&gt;
&lt;br&gt;
Problem: As users open files and save them, they take ownership of them, thus locking out other users from changing and saving the documents because they do not own them.&lt;br&gt;
&lt;br&gt;
Where do I set security up to avoid this from happening? Is the file security stored on the individual files (thus having to run chmod or chown) or in Samba? &lt;br&gt;
I guess I need to create groups and give the group ownership of the files so that everyone in the group (practically all clients) can access/change/delete files at will. There will also be 1 or 2 superusers running backups or doing administration activities. How do I give them access without allowing them to take ownership of the files and lock everyone else out?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.83537</guid>
		<pubDate>Wed, 13 Feb 2008 06:16:17 -0800</pubDate>
		<dc:creator>ijoyner</dc:creator>
		
			<category>samba</category>
		
			<category>windows</category>
		
			<category>networking</category>
		
			<category>filesharing</category>
		
			<category>linux</category>
		
	</item> <item>
		<title>By: ArkhanJG</title>
		<link>http://ask.metafilter.com/83537/Sambafilter#1237036</link>	
		<description>Use this syntax for the share in smb.conf&lt;br&gt;
The security is the most restrictive of the share, the folder, and the individual files.&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&lt;br&gt;
[sharedfolder]&lt;br&gt;
        path = /home/sharedfolder&lt;br&gt;
        valid users = @&quot;myspecialusers&quot;&lt;br&gt;
        force user = adminuser1        &lt;br&gt;
        force group = &quot;myspecialusers&quot;&lt;br&gt;
        browseable = yes&lt;br&gt;
        writeable = yes&lt;br&gt;
        create mode = 0660&lt;br&gt;
        directory mode = 0770&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
This means all new files created will be owned by &quot;adminuser1&quot;, with group &quot;myspecialusers&quot;. All members of the group will have read and write access to files, and read,write,execute for sub-folders. The adminuser1 is arbitrary; it just needs to exist. Also, your members need to be in &quot;myspecialusers&quot;.&lt;br&gt;
&lt;br&gt;
Also, you&apos;ll want to &lt;br&gt;
&lt;code&gt;&lt;br&gt;
chown -R admin1:myspecialusers /home/sharedfolder&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
You&apos;ll also want to chmod 660 the existing files, and chmod 770 the directories. For simplicity, you could get away with just:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
chmod -R 770 /home/sharedfolder&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
Or just create the share from scratch, and copy the old files in via the samba share.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
If you need extra individual users to get read access, without giving them write access, use this format:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
[opensharedfolder]&lt;br&gt;
        path = /home/sharedfolder&lt;br&gt;
        valid users = backupuser1, backupuser2, @&quot;myspecialusers&quot;&lt;br&gt;
        force user = adminuser1        &lt;br&gt;
        force group = &quot;myspecialusers&quot;&lt;br&gt;
        browseable = yes&lt;br&gt;
        writeable = yes&lt;br&gt;
        create mode = 0664&lt;br&gt;
        directory mode = 0775&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
and chmod the old files 664 and 775 respectively. i.e. use&lt;br&gt;
&lt;code&gt;&lt;br&gt;
chmod -R 775 /home/sharedfolder&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 This is less secure (anyone not a member of &quot;myspecialusers&quot; with a shell account will have read access), but I suspect that wouldn&apos;t be an issue.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.83537-1237036</guid>
		<pubDate>Wed, 13 Feb 2008 09:10:13 -0800</pubDate>
		<dc:creator>ArkhanJG</dc:creator>
	</item>
	</channel>
</rss>
