Bugzilla – Attachment 247179 Details for
Bug 437765
mv command does not inherit ACLs on moved files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
shell script used to prepare a collaboration directory
setacls+sgid.sh (text/plain), 1.21 KB, created by
Forgotten User Drfk9mafMw
on 2008-10-22 14:45:34 UTC
(
hide
)
Description:
shell script used to prepare a collaboration directory
Filename:
MIME Type:
Creator:
Forgotten User Drfk9mafMw
Created:
2008-10-22 14:45:34 UTC
Size:
1.21 KB
patch
obsolete
>#!/bin/bash > >if [ ! $# -eq 2 ] >then > echo "Wrong parameters!" > echo "$(basename $0) GROUP BASEDIR" > exit 1 >fi > >GROUP=$1 >BASEDIR=$2 > >echo -e "\n Preparing the directory:" >echo "Changing directory permissions to 770 (u+rwx,g+rwx,o-rwx) ..." >find $BASEDIR -type d -exec setfacl --set u::rwx,g::rwx,o::--- {} \; >echo "Changing file permissions to 660 (u=rw,g=rw,o=-rwx) ..." >find $BASEDIR -type f -exec setfacl --set u::rw-,g::rw-,o::--- {} \; >echo "Changing GID recursively to $GROUP ... " >chgrp -R $GROUP $BASEDIR > >echo -e "\n Setting SGID-Bit ..." >## alle Dateien und Ordner (=Unsinn!): ># chmod -R g+s $BASEDIR >## nur Ordner: >find $BASEDIR -type d -exec chmod g+s {} \; > >echo -e "\n Applying default ACLs recursively to $BASEDIR ..." >## wirkt sich eh nur auf Ordner aus: >setfacl -R -d --set u::rwx,g:$GROUP:rwx,o::--- $BASEDIR ># setfacl -R -d -m g:$GROUP:rw-,o::--- $BASEDIR > >echo -e "\n Applying default mask rwx ..." >## alle Dateien und Ordner: NICHT gut! ># setfacl -R -m m::rwx $BASEDIR >## nur Ordner: >find $BASEDIR -type d -exec setfacl -m m::rwx {} \; >## nur Dateien: >find $BASEDIR -type f -exec setfacl -m m::rw- {} \; > >echo -e "\n Done." > >#setfacl -d --set u::rwx,g::rwx,o::- $BASEDIR >#setfacl -d -m g:optiker:rw,o::- $BASEDIR
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 437765
: 247179 |
247181