<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ali Aboosaidi &#187; share directory</title>
	<atom:link href="http://insanelabs.com/tag/share-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://insanelabs.com</link>
	<description>Umm... Unorthodox?</description>
	<lastBuildDate>Tue, 08 Nov 2011 21:04:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Linux: Share a directory between local users</title>
		<link>http://insanelabs.com/linux/linux-share-a-directory-between-local-users/</link>
		<comments>http://insanelabs.com/linux/linux-share-a-directory-between-local-users/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 18:55:11 +0000</pubDate>
		<dc:creator>Ali</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[share directory]]></category>

		<guid isPermaLink="false">http://insanelabs.com/?p=705</guid>
		<description><![CDATA[I spent a few hours yesterday trying to get this done but ran into several problems, and worst of all, I couldn&#8217;t find one single post addressing all permission problems associated with allowing several users access to the same directory for read/write operations. The best way of creating a shared directory is to create a [...]
Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-user-management/" rel='bookmark' title='Linux: User management' class="liinternal">Linux: User management</a></li>
<li><a href="http://insanelabs.com/linux/linux-crontab-notes-for-different-users-run-a-cron-job-every-time-a-system-reboots/" rel='bookmark' title='Linux: Crontab notes for different users &#8211; run a cron job every time a system reboots' class="liinternal">Linux: Crontab notes for different users &#8211; run a cron job every time a system reboots</a></li>
<li><a href="http://insanelabs.com/windows/windows-cannot-add-active-directory-users-and-computers-snap-in-in-windows-xp-64-bit/" rel='bookmark' title='Windows: Cannot add Active Directory Users and Computers snap-in in Windows XP 64 bit' class="liinternal">Windows: Cannot add Active Directory Users and Computers snap-in in Windows XP 64 bit</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I spent a few hours yesterday trying to get this done but ran into several problems, and worst of all, I couldn&#8217;t find one single post addressing all permission problems associated with allowing several users access to the same directory for read/write operations.</p>
<p>The best way of creating a shared directory is to create a user and group, and then a home directory. Make other users members of the new group and set permission inheritence to propagate to child objects regardless of the user who is creating or uploading the file.</p>
<p>User name is shareowner and group, sharedhome.</p>
<p>Create a user, group and home directory for the new user:</p>
<pre>useradd -d /home/shareowner -g sharedhome -m shareowner</pre>
<p>The above command creates a user and group as user&#8217;s primary group. I wouldn&#8217;t create a password for the user if I don&#8217;t want the user to actually be able to logon to the server. Once the home directory is created I will add the existing users to the new group:</p>
<pre>usermod -G sharedhome existinguser1
usermod -G sharedhome existinguser2</pre>
<p>and so on. Note that I use -G and not -g, as I want users to become additional users of the new group. Now we set permissions for the new directory&#8230; I make shareowner the owner, and sharedhome the group that owns the directory:</p>
<pre>chown -R shareowner:sharedhome /home/sharedhome</pre>
<p>Then I use umask and chmod to force all files in /home/sharedhome to inherit permissions from the top directory:</p>
<pre>umask 002
chmod -R g+s /home/sharedhome</pre>
<p>That&#8217;s it. Now existinguser1 and existinguser2 should have read/write permission to /home/sharedhome directory.</p>
<p>Related posts:<ol>
<li><a href="http://insanelabs.com/linux/linux-user-management/" rel='bookmark' title='Linux: User management' class="liinternal">Linux: User management</a></li>
<li><a href="http://insanelabs.com/linux/linux-crontab-notes-for-different-users-run-a-cron-job-every-time-a-system-reboots/" rel='bookmark' title='Linux: Crontab notes for different users &#8211; run a cron job every time a system reboots' class="liinternal">Linux: Crontab notes for different users &#8211; run a cron job every time a system reboots</a></li>
<li><a href="http://insanelabs.com/windows/windows-cannot-add-active-directory-users-and-computers-snap-in-in-windows-xp-64-bit/" rel='bookmark' title='Windows: Cannot add Active Directory Users and Computers snap-in in Windows XP 64 bit' class="liinternal">Windows: Cannot add Active Directory Users and Computers snap-in in Windows XP 64 bit</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://insanelabs.com/linux/linux-share-a-directory-between-local-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

