Windows login script to automatically map users to Samba share

 If you have configured Samba to share a folder and want your Windows users to automatically connect to it do the following: Create a logon script logon.bat: net use Z: /delete net use Z: \\192.168.0.100\data In a non-domain environment Put this script in: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup on Windows 7 computers. Put this script in: C:\Documents and Settings\All Users\Start Menu\Programs\Startup on Windows XP computers. In a Windows domain environment In a Windows domain environment you can can configure Group...

read more

CentOS – WordPress Uploads directory permissions

 Most WordPress installations recommend to change your directory permissions to 755 on all directories.  Unfortunately, this does not work on the Uploads directory, since the parent directory owner is one user, and the process that executes uploads is either the ‘apache’ user or ‘nobody’ user for PHP.  Here is what we did to resolve the WordPress Uploads directory permissions problem: cd to the /wp-content directory chmod 777 uploads This will allow the apache process to create new files and directories inside...

read more

CentOS and Apache – password protect with .htaccess and .htpasswd

 To protect /stats sub-directory: Edit /home/.htpasswd file user:encryptedpassword Add .htaccess file to /home/usr/usrname/stats/.htaccess AuthUserFile /home/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword AuthType Basic require user usrNAMEhere ===

read more

CentOS – copy old website files to new location

 wget --mirror ftp://user:password@oldIPaddress/ or wget --mirror -nH -P /path/to-download-folder --user=username --password='password' ftp://website.com -nH = does not create the parent directory using the host name from original source, it website.com. -P /path = where you want the files to go to

read more