[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Sep 1 15:20:49 2004 -->
- <!--x-from-r13: zvxr ng glqrevn.arg ([vxr [hecul) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Specify permissions, owner, and group of newly created files -->
- <li><em>date</em>: Wed Sep 1 15:20:49 2004</li>
- <li><em>from</em>: mike at tyderia.net (Mike Murphy)</li>
- <li><em>in-reply-to</em>: <<a href="msg00032.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00032.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Specify permissions, owner, and group of newly created files</li>
mkdir directory
chgrp mygrp directory
chmod g+ws directory (the w makes it writable by group, the s set's the
gid bit)
that still doesn't ensure that the files in there get created group
writable, it just ensures that they get the group set to "mygrp". To
make them group writable, the umask of the creating process (be it an
ftp server, or a shell, or whatever) would have to change. Something
like "umask 002" would do it. That would make a new file created by that
user get mode 664, and a new directory get 775.
You can do similar tricks with the user by setting a directory to be
owned by some user, and then doing a 'chmod u+ws'. If its not group
writable though, the created files wouldn't ever be updatable by anyone
but that user, so some combination of user and group permissions are
probably in order.
You can usually set default permissions and user and group ownership on
a server you might be using, be it most ftp servers, or samba, which
also might solve your problem.
Mike
Rick Huebner wrote:
> I've always wondered how to make new files created in a directory be created
> with a specific permission, owner, and group. Right now, I have a series of
> cron jobs that run to change the permissions in several directories each
> hour. Is there any way on a per directory basis to do this?
>
> Rick
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> <a rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Mike Murphy
781 Inman Mews Drive Atlanta GA 30307
Landline: 404-653-1070
Mobile: 404-545-6234
Email: mike at tyderia.net
AIM: mmichael453
JDAM: 33:45:14.0584N 84:21:43.038W
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00034" href="msg00034.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
<ul><li><em>From:</em> rick at rhuebner.com (Rick Huebner)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00032" href="msg00032.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
<ul><li><em>From:</em> rick at rhuebner.com (Rick Huebner)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00032.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00034.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00032.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00034.html">[ale] Specify permissions, owner, and group of newly created files</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00033"><strong>Date</strong></a></li>
<li><a href="threads.html#00033"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>