Background
When you work with a team and upload files in the download area, you want to use appropriate permissions so that other members of your team can also make change.
Savannah is specially configured for this task: the download areas carry
the 'setgid' bit (chmod g+s
) so that newly created directories belong
to your group. Moreover, the default umask for all SSH sessions
is 002, which means members of your group will have write access to the
files and directories you create.
Unfortunately, tools like scp
do not always respect this:
- new files sent via scp get the original file's permissions (sr #105830)
How to fix permissions for existing files
Eric Noulard suggested the following procedure for fixing directories, by downloading the whole download area, and uploading only the fixed directories:
mkdir mygroup_da
scp -r erk@dl.sv.nongnu.org:/releases/mygroup mygroup_da
# mygroup_da contains 'mygroup/'
mkdir mygroup_dironly
cd mygroup/
find . -type d -exec mkdir ../mygroup_dironly/{} \;
cd mygroup_dironly/
chmod -R g+ws .
scp -rp mygroup erk@dl.sv.nongnu.org:/releases/
This doesn't fix the directories group though.