Changing Directory Ownership via Command Line

Trying to replace, delete or change files via FTP, you may notice you get insufficient permissions errors. If you haven’t seen this a lot, your first instinct is to try to change the permissions on the directories in question, in which case you will continue to get mooned. This issue is less about permissions per se than about directory ownership. If you’re running on a server that has some directories owned by nobody/99, that means the server itself is considered “owner” and individual users won’t be able to change or delete these. ((If your server requires 777 permissions for certain functions, then you most likely will have some directories “owned” by the server/nobody.))

chown -Rv username:groupname *

The username/groupname should be replaced with your info–but you don’t know this already, best to get out of there and get tech support to help you–and these two will normally be the same. The R makes it recursive, changing the files inside the directory as well as the directory you run the command on, and the v gives you verbose output so you can see what got changed.

Share Button

Releasing Items from Mailscanner Que

The easiest is to have your mailscanner configured to quarantine Whole Message as Queue files; from Chirpy with instructions for this and more, here.

Quarantine Whole Message = yes
Quarantine Whole Messages As Queue Files = yes

then to requeue the email to be delivered, you need to go to the indicated directory within:
/var/spool/MailScanner/quarantine/<date>/<message-id>/

Then you need to:
cp -av *-H /var/spool/exim/input/ ; cp -av *-D /var/spool/exim/input/
one done you’ll have to wait for the next exim mail queue run, or run it yourself from WHM > Manage Queue > <message-id> > Deliver Now

Share Button

Moving WordPress Installation to New Domain – SQL

A few database changes need to be done when moving WP from one domain to another; information below taken from a very  helpful article at My Digital Life:

To update WordPress options with the new blog location, use the following SQL command:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field. The URL values in this field are stored as absolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

Share Button

Default New Account Address of Server IP/~username Not Working?

If you cannot access your sites via http://ipaddress/~username (usually used as a temporary address pending domain propagation for new hosting clients), check that the Apache module mod_userdir, if enabled, has an exception configured for the default virtual host.

End transmission.

Share Button

cPanel /WHM Server Default Parking Page

To set up a default parking page for cPanel/WHM server, you need to place your default files in the proper place.

Check /usr/local/apache/htdocs for when a domain resolves to your server but does not actually exist in the Apache configuration file. If you just need a park page set up you can place it in that directory and name it index.php, index.html, etc.

As always, your configuration may vary.

Share Button