-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Can't change storage settings because folder is not owned by BC, yet …
…it can write to it #563
- Loading branch information
1 parent
81d6be3
commit 3d61848
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# script to change permission of file | ||
|
||
# File variable to store location | ||
|
||
FILE="$1" | ||
|
||
#if [[ ! -e "${FILE}" ]]; then | ||
# mkdir -p "${FILE}" | ||
## echo "creating directory..." | ||
#elif [[ ! -d "${FILE}" ]]; then | ||
# echo "FILE already exists but is not a directory" | ||
#fi | ||
|
||
## to remove write permission of other and group of file | ||
#chmod 770 "${FILE}" | ||
#chown -R bluecherry:bluecherry "${FILE}" | ||
|
||
#to check if the permission are removed | ||
#ls -la "${FILE}" | ||
|
||
# find out if file has write permission or not | ||
#[ -w $FILE ] && W="Write = yes" || W="Write = No" | ||
[ -w $FILE ] && W=w || W='-' | ||
|
||
# find out if file has excute permission or not | ||
[ -x $FILE ] && X=x || X='-' | ||
|
||
# find out if file has read permission or not | ||
[ -r $FILE ] && R=r || R='-' | ||
|
||
#echo "$FILE permissions" | ||
echo "-$W$R$X" | ||
|
||
|
||
|
||
# to check the file we want to change | ||
## exists or not | ||
#if [[ ! -e "${FILE}" ]] | ||
#then | ||
# echo "creating ${FILE} file" | ||
# touch file.txt | ||
#fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters