“UNPROTECTED PRIVATE KEY FILE!” Error using SSH into Amazon EC2 Instance (AWS)

This is probably a stupidly simple question to some 🙂 I’ve created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in. When I tried to ssh with: ssh -i myfile.pem <public dns> I got: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ … Read more

Is there a way (plugin?) to restrict a user to being able to edit just one page?

We use wordpress like a CMS and would very much like to allow users to have a “homepage”. Ideally they’d be prevented from mucking up the whole site. Is there a simple way to limit users editing rights to a single page? I’m currently using the Members plugin to do other permission-based stuff, so it’d … Read more

What is valid timing of using current_user_can() and related functions?

During the vanilla WP core load the current user is being set up in $wp-init() which is after theme load and before init hook. This is in line with good practice of functionality getting hooked to init or later. However it is also common practice to call related functions, such as current_user_can() earlier than that. … Read more

Update post counts (published, draft, unattached) in admin interface

I am working on a multi-user WordPress setup and have made it so a particular type of user can only see and interact with posts, images, pages etc that they have authored. The code to make this happen looks like this: add_filter(‘pre_get_posts’, ‘current_author_posts’); function current_author_posts($query) { if ($query->is_admin && current_user_can(‘artist’)) { global $user_ID; $query->set(‘author’, $user_ID); … Read more

How do I use sudo to redirect output to a location I don’t have permission to write to? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 months ago. Improve this question I’ve been given sudo access on one of our development RedHat linux boxes, and I seem to find myself … Read more

How to fix npm throwing error without sudo

I just installed node and npm through the package on nodejs.org, and whenever I try to search or install something with npm, it throws the following error unless I sudo the command. I have a feeling this is a permissions issue? I am already the admin. npm ERR! Error: EACCES, open ‘/Users/chietala/.npm/-/all/.cache.json’ npm ERR! { … Read more