I somehow change the owner of / on my ldap-samba server whilst trying to
write a script to create home dir and set ownership/permissions. I
changed everything back to owner/grp root.
Now I can't get into phpldapadmin because, I assume, the ownership has
changed. The error is:
Fatal error: Cannot read your configuration file
"/usr/share/phpldapadmin/config/config.php", its permissions are too
strict.
What is the correct owner/grp of /usr/share/phpldapadmin? Is there any
other directories I need to look out for.
While I'm at it does anyone happen to know why this script would have
done that?
#!/usr/bin/perl
open (UNIXFILE,'lusers') or die 'Could not open file.' ;
my $i = 0 ;
for $line(<UNIXFILE>)
{
print "Iteration : " . $i . "\n" ;
chomp ($line) ;
mkdir ("/home/$line", 0700) ;
print "Creating user directory" . $line . "\n" ;
system("cp /etc/skel /home/$line") ;
print "Copy Profile" . $line . "\n" ;
#print "chown" . $line . " /home/" . $line . "\n" ;
#system("chown $line /home/$line") ;
print "Setting username as owner of home dir" . $line . "\n" ;
#system("chgrp domusers /home/$line") ;
#print "Setting group of home dir" . $line ;
#system("mkdir /home/$line/data") ;
mkdir ("/home/$line/data",0700) ;
print "Creating data directory" . $line . "\n" ;
mkdir ("/home/$line/profiles",0700) ;
print "Creating profiles directory" . $line . "\n" ;
#system("chown $line /home/$line/") ;
#print "Performing ownership user directory" . $line . "\n" ;
#system("chgrp domusers /home/$line/") ;
#print "Setting group of user directory" . $line . "\n" ;
#system("chmod 700 /home/$line/data") ;
#print "Permissions for data directory" . $line . "\n" ;
#system("chmod 700 /home/$line/profiles") ;
#print "Permissions for profiles directory" . $line . "\n" ;
#system("chmod 700 /home/$line") ;
#print "Permissions for user directory" . $line ;
print "\n\n" ;
$i++ ;
}
close(UNIXFILE) ;
-----------------------------------------------------------------
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyrighted. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. USIT has scanned this email for viruses and
dangerous content and believes it to be clean. However,
virus scanning is ultimately the responsibility of the recipient.
-----------------------------------------------------------------
USIT Ireland Ltd. Company No. 377526. Registered Office 19/21 Aston Quay Dublin
2.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
phpldapadmin-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpldapadmin-users