The original user is not detected properly whn multiple users are logged in. This fix gets the first logged in user.
This commit is contained in:
parent
6f3e5ba201
commit
41f7110d7a
@ -12,7 +12,7 @@ if [ "$(id -u)" = "0" ] ; then
|
||||
echo "Applying original ownership to all affected files. This may take a while."
|
||||
|
||||
# Find the original user. Note that this may not always be correct.
|
||||
ORIG_USER=`who | awk '{print \$1}'`
|
||||
ORIG_USER=`who | head -n 1 | awk '{print \$1}'`
|
||||
echo "Original user is '$ORIG_USER'."
|
||||
|
||||
# Apply ownership back to original owner for all affected files.
|
||||
|
Loading…
x
Reference in New Issue
Block a user