Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
1420ea12
Commit
1420ea12
authored
Dec 11, 2012
by
Anton Agapov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New script groupcheck.sh
parent
edd1be3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
groupcheck.sh
common/groupcheck.sh
+33
-0
No files found.
common/groupcheck.sh
0 → 100755
View file @
1420ea12
#!/bin/bash
if
[
-z
"
$1
"
]
;
then
ROOT_DIR
=
"
$(
echo
"
$PWD
"
)
"
elif
[
-d
"
$1
"
]
;
then
ROOT_DIR
=
"
$(
echo
"
$1
"
)
"
else
echo
echo
"The script checks recursively the group write access then"
echo
"lists directory first and after the short break the files"
echo
"that have no such permission."
echo
echo
"Usage: groupcheck.sh [ROOT_DIR]"
echo
"Where ROOT_DIR - the start point of the recursive check."
echo
"If no ROOT_DIR specified, the current directory is applied instead."
echo
exit
1
fi
echo
echo
"Directories:"
find
"
$ROOT_DIR
"
-type
d
!
-perm
-g
=
w
-exec
ls
-l
-d
--full-time
"{}"
\;
|
cut
-d
' '
-f1
,3,4,9-
echo
echo
"3 sec break before files output listing..."
echo
sleep
3
echo
"Files:"
find
"
$ROOT_DIR
"
-type
f
!
-perm
-g
=
w
-exec
ls
-l
--full-time
"{}"
\;
|
cut
-d
' '
-f1
,3,4,9-
echo
#find "$ROOT_DIR" ! -perm -g=w -exec chmod g+w "{}" \;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment