Share fixes
This commit is contained in:
parent
a8d460733d
commit
53f08be2b1
1 changed files with 6 additions and 5 deletions
|
@ -11,7 +11,7 @@ echo "$number volume(s) found."
|
||||||
for volume in $x
|
for volume in $x
|
||||||
do
|
do
|
||||||
echo -n "Investigating volume /$volume..."
|
echo -n "Investigating volume /$volume..."
|
||||||
for i in `find /$volume/ -mindepth 2 -maxdepth 2 -type d | egrep -v "\/$volume\/home|\/$volume\/.apps|\/$volume\/.vault|\/$volume\/.purge|\/$volume\/._share|\/$volume\/.timemachine|\/$volume\/.TemporaryItems|.iscsi" | sed "s/\/$volume\///g;s/\/.*//g" | sort | uniq`
|
for i in `find /$volume/ -mindepth 1 -maxdepth 2 -type d | egrep -v "\/$volume\/home|\/$volume\/.apps|\/$volume\/.vault|\/$volume\/.purge|\/$volume\/._share|\/$volume\/.timemachine|\/$volume\/.TemporaryItems|.iscsi" | sed "s/\/$volume\///g;s/\/.*//g" | sort | uniq`
|
||||||
do
|
do
|
||||||
found=1
|
found=1
|
||||||
path="/$volume/._share/${i}"
|
path="/$volume/._share/${i}"
|
||||||
|
@ -45,12 +45,12 @@ EOF
|
||||||
........................
|
........................
|
||||||
........................
|
........................
|
||||||
EOF
|
EOF
|
||||||
cat > fs.conf << EOF
|
cat > $path/fs.conf << EOF
|
||||||
compression = 0
|
compression = 0
|
||||||
bitrotprotection = 0
|
bitrotprotection = 0
|
||||||
refquota = 0
|
refquota = 0
|
||||||
EOF
|
EOF
|
||||||
cat > ftp.conf << EOF
|
cat > $path/ftp.conf << EOF
|
||||||
available 0
|
available 0
|
||||||
default_access disabled
|
default_access disabled
|
||||||
mask
|
mask
|
||||||
|
@ -63,7 +63,7 @@ user_ro
|
||||||
group_ro
|
group_ro
|
||||||
host_ro
|
host_ro
|
||||||
EOF
|
EOF
|
||||||
cat > samba.conf << EOF
|
cat > $path/samba.conf << EOF
|
||||||
[$i]
|
[$i]
|
||||||
path = /$volume/$i
|
path = /$volume/$i
|
||||||
comment = "$i folder"
|
comment = "$i folder"
|
||||||
|
@ -74,6 +74,7 @@ EOF
|
||||||
follow symlinks = 1
|
follow symlinks = 1
|
||||||
EOF
|
EOF
|
||||||
echo -n "Fixing permissions on files..."
|
echo -n "Fixing permissions on files..."
|
||||||
|
cd $path
|
||||||
chown root.root datasettype.conf recycle.conf snapdir.conf snapshot.conf
|
chown root.root datasettype.conf recycle.conf snapdir.conf snapshot.conf
|
||||||
chown admin.admin afp.conf fs.conf ftp.conf nfs.conf samba.conf custom_snapshot_management.conf custom_snapshot_schedule.conf
|
chown admin.admin afp.conf fs.conf ftp.conf nfs.conf samba.conf custom_snapshot_management.conf custom_snapshot_schedule.conf
|
||||||
echo " done!"
|
echo " done!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue