Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/usr/bin/perl
# Make sure this is being run by root. Otherwise, all of the chowns
# are likely to fail
if ($< != 0)
{ print "fixowner must be run with root permissions. Try running\n";
print "it with sudo.\n";
print "\n";
exit -1;
}
if (@ARGV < 3)
{ print "USAGE: fixowner olduid shortname dirtofix\n";
print "where olduid is the old UID of the changed user\n";
print " shortname is the short username of the changed user\n";
print " dirtofix is the directory tree that you want to fix\n";
print "\n";
exit -1;
}
$olduser = $ARGV[0];
$newuser = $ARGV[1];
@newuserpw = getpwnam($newuser);
if (@newuserpw == 0)
{ printf "No such user: $newuser\n";
exit -1;
}
$newuid = $newuserpw[2];
$start = $ARGV[2];
open (LIST, "find \"$start\" -user $olduser \! -path \"/dev/*\" |") ||
die "Can't pipe in find results\n";
while (<LIST>)
{ ($file) = /(.*)\n$/;
chown $newuid, -1, $file;
print "$file\n";
}