Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 887deb985f
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (22 sloc) 0.604 kb
#!/bin/bash
# Author: Matt Wells
# Name: permadoc
prog=permadoc
# Version: 1.0
# Release: 1
# Summary: To backup and document all permissions of a directories
# and create a script to fix the permissions in case of a problem.
# Group: admin-tools
# License: GPL
# URL: www.sprackle.org
# Requires: coreutils
# Directory to scan.
DIRECTORY="/home/"
# Execute
for i in `find $DIRECTORY -type d`;
do
cd $i
echo "cd $PWD" >> /tmp/current_perms
ls -ls $PWD | awk '{print "chown",$4":"$5,$10}' | egrep -v "^:" >> /tmp/current_perms # Create a rollback file
# in case old permissions need to applied
done
Jump to Line
Something went wrong with that request. Please try again.