4,461
edits
initial save |
iwu |
||
Line 1: | Line 1: | ||
== Copy including hidden files == | |||
* ''Last tested on Ubuntu 14.04.2 LTS (trusty)'' | * ''Last tested on Ubuntu 14.04.2 LTS (trusty)'' | ||
<source lang="bash | <source lang="bash"> | ||
$ cp -r folder1/. target/ | $ cp -r folder1/. target/ | ||
</source> | |||
== Setting a default group for a folder == | |||
* ''Last tested on Ubuntu 16.04 LTS (xenial)'' | |||
This is to set permission for an '''existing''' folder for collaboration. This assumes the group name to be <span class="package">dev</span>, and the folder to be <span class="shell">/srv/www/project</span>. | |||
This sets <code>setgid</code> bit on the folder. | |||
<source lang="bash"> | |||
$ sudo find /srv/www/project -type d -exec chgrp dev {} + | |||
$ sudo find /srv/www/project -type d -exec chmod g+s {} + | |||
</source> | |||
Make it writable by the group. | |||
<source lang="bash"> | |||
$ sudo chmod -R g+w /srv/www/project | |||
</source> | |||
These commands should be executed for a '''new''' folder. | |||
<source lang="bash"> | |||
$ sudo chgrp dev /srv/www/project | |||
$ sudo chmod g+s /srv/www/project | |||
</source> | </source> |