Write permission error when installing gems

Overview On newer v6+ platforms with support for multiple Ruby interpreters, installing a gem may fail resulting in a similar error message: [user@sol ~]$ gem install –no-rdoc –no-ri passenger rails Fetching: passenger-5.0.6.gem (100%) ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /.socket/ruby/gems/ruby-2.1.2 directory. Cause The environment variable GEM_HOME is not configured…

pip install fails with “Permission denied” on Python 3+

Overview Python’s integrated package manager, pip, fails to install packages when Python 3.0 and above is used raising a PermissionError. Below is an abbreviated sample output: [myadmin@sol]$ pip install django Downloading/unpacking django Installing collected packages: django Cleaning up… Exception: Traceback (most recent call last): File “/.socket/python/python3.4/site-packages/pip/wheel.py”, line 205, in clobber os.makedirs(destdir) File “/.socket/python/python3.4/os.py”, line 237,…

Updating WordPress

Overview Periodic updates for WordPress and its plugins are released to introduce new features, address performance problems, and resolve security vulnerabilities. Keeping WordPress up-to-date is critical to ensure that your site operates without interruption and without being hacked. How to update One-Click Method As of May 10, 2016 one-clicks have returned to the control panel on all…

Problems deleting files

Overview FTP provides a convenient interface to quickly delete multiple files from a your site with minimal overhead. Problems can exist in multi-user environments where files are owned by one of many different users. Cause FTP abides by UNIX discretionary access controls (DAC) that restricts what files users can delete/modify/read. Without requisite permissions these files, owned…

Enabling write-access

Overview The web server operates in a dual-user mode for enhanced security. In order for a web application to access your filesystem, specific permissions must be granted. Solution Change permissions on necessary files to 717 or 777. For WordPress, wp-content/uploads/ and wp-content/themes/  should be changed recursively to allow media uploads and theme editing in-browser. If plugin…

open_basedir restriction message

Overview When attempting to access a file in PHP, the script will yield a warning similar to: Warning: fopen(): open_basedir restriction in effect. File(/var/www/myresource) is not within the allowed path(s): (/home/virtual/site2/fst:/var/www/html:/usr/local:/usr/bin:/usr/sbin:/etc:/tmp:/proc:/dev:/.socket) in /home/virtual/site2/fst/var/www/html/myfile.php on line 3 Cause This is caused by mistakenly referencing a path within a pivot root inconsistent with PHP. PHP runs with a…

Writing to files

Overview PHP operates as a separate user to enhance security across the server. In the event of a hacking event on a client’s site, the attacker only has access to what it can access, which protects sensitive e-mails and SSH keys that reside within the same storage space. Certain applications like WordPress and Drupal will complain that the…