Joomla 3.1 setup on Ubuntu 12.04 running nginx - joomla

My objective is to have Joomla 3.1 running on an Ubuntu server using nginx.
I am testing the setup locally but I keep encountering problems. I think this is concerned with the permissions in my Joomla source files.
I tried to install a package (T3) manually using the "Install From Directory" option. However, I receive the following message:
Warning JFTP: :store: Bad response
JInstaller: :Install: Failed to copy file
/usr/share/nginx/immigrationinformation.com/components/com_installer/t3-1.4.1/source/plg_system_t3/t3.php
to
/usr/share/nginx/immigrationinformation.com/plugins/system/t3/t3.php
Package Install: There was an error installing an extension:
plg_system_t3
I know that this is the wrong way to set up the server but currently I have all the source files permissions set to 777. When this T3 package tries to install, it creates a folder in plugins/system/ called t3. This has only permissions drwxr-xr-x and thus the reason for the above errors.
My question is: What is the correct method to set up my Joomla 3.1 package such that I can ensure a smooth operation of the site, in a secure manner.
Thanks in advance!

The permissions when t3 installs are correct, it sounds like the problem is with ownership rather than permissions.
I think in ubuntu the system user is www-data so you would need to run the following over ssh
chown -hR www-data:www-data /path/to/joomla/root
Then upload the plugin through the joomla installer (and change folder permissions back to 755 and files to 644).

Related

Permission denied when trying to run karaf 0.8.1

I downloaded the OpenDaylight Oxygen SR1 Zip file, unzipped the karaf-0.8.1 file, changed my directory to it but when I try to run ./bin/karaf I get:
./bin/karaf: Permission denied
When I try sudo ./bin/karaf I get
sudo: ./bin/karaf: command not found
The weirdest part is that I also have the folder of the previous version, i.e. karaf-0.7.1, in the same Downloads folder and these commands work perfectly fine in there. I would like to use the latest version however. Could anyone help me please?
Edit: Sorry, forgot to mention I'm running it on Mac OS X
On a Unix-like system, you’re better off downloading the tarball: extracting that will give you files with the correct permissions.
In your case, to fix your setup, you need to run
chmod 755 bin/{client,inc,instance,karaf,setenv,set_persistence.sh,shell,start,status,stop}
to restore the permissions as they ship in the tarball.

Why can I import certain modules in Python only with administrator rights?

I'm struggling with some strange issues in Python 2.7. I wrote a very long tool where I import different modules, which I had to install first using pip. The tool is to be shared within the company, where different users have different rights on their specific machines.
The problem occurred when another user logged into my machine (I'm having administrator rights there) and tried to use the tool. He was unable to run it, because specific modules could not be imported because of his status as a "non-admin".
The error message is simply "No module named XY".
When we looked into the file system, we found that we were not able to look into the folder where the module had been installed, simply because the access was denied by the system.
We also got this error message when trying to run pip from the cmd; it prints "Access denied" and won't do anything.
How is it possible, that some modules can be accessed by anyone, while others can't? And how can I get around this problem?
Specifically, I'm talking about sqlalchemy and pyodbc.
Thanks a lot in advance.
EDIT 1: Oh, and we're talking about Windows here, not Linux...
EDIT 2: Due to company policy it is not possible to set administrator permissions to all users. I tried, as suggested, but it didn't work and I learned that it's not possible within the company.
Got it...
Following the advice of Nabeel Ahmed, I first uninstalled the packages which caused the issues from my admin account. Then I changed the script to
pip install --user {module_name}
and voila... it works for all users now.
Thanks a lot for you help, guys!
You should either use virtualenv as stated before or set the proper permissions to the site-packages folder. I should be in C:\Python27\Lib.
One simply solution is set permissions for site-package directory (where the packages gt installed) as per usable by all i.e. read and execute permission for all on the directory:
sudo chmod -Rv ugo+rX /usr/lib/python2.7/site-packages/
Also for the lib64 packages - the path to site-packages may vary for various Linux distros.
Edit 1: For windows look into this 'File and Folder Permissions' for setting Read & Execute permissions for all, for a file or folder (i.e. site-packges)
The path 'd be - C:\Python27\Lib\site-packages
Edit 2: in apropos of:
EDIT 2: Due to company policy it is not possible to set administrator
permissions to all users. I tried, as suggested, but it didn't work
and I learned that it's not possible within the company.
if so, simply install sqlalchemy (or any other package) for specific user using pip:
pip install --user {module_name}
Source: Per user site-packages directory.

Change ownership of vagrant homestead directory

I'm trying to install Magento 2 on a homestead environment and The only sticking block I've hie is one of the requirements for file ownership
The owner of the Magento file system:
Must have full control (read/write/execute) of all files and directories.
Must not be the web server user; it should be a different user.
Is it possible with homestead to change the ownership of a site? I've been searching google fanatically trying to find anyone who has mentioned it and the only result i found is someone mentioning this same quote from Magento themselves while they were trying to run Magento 2 on Homestead, though they never mentioned how they solved the issue.
I tried setting up a new user manually as I would on CentOS with sudo on the vagrant user, but when trying to run chown on the files they don't change from vagrant:vagrant

Installing Magento on CentOS nightmare (AVC denial)

I'm trying to install Magento unto my CentOS that I'm running off Hyper-V and it's driving me crazy. I set everything up as per tutorial, but every time I reach the locale page of the setup it says "AVC denial... attempting to write to /var. I'm pretty new with linux but I tried almost everything, I did what the error told me and set the label of the /var directory and all the directories below it to httpd_sys_content_t and made sure it has write permission. After that didn't work I gave up and decided to reposition the server to a custom folder in /usr directory, I changed all the apache config files so it doesn't mention /var directory at all, but the apache process is still attempting to write to it for some reason. Can anybody help me out with this?
Try
grep "denied" /var/log/audit/audit.log
What's there?
And for your information, Magento want to access file on magento folder var, log or report or cache
Go to your Magento folder and you can change it with
sudo chmod -R 777 var
it will give access to write and change file inside there.

Drupal install on localhost asks for FTP info

I'm running Drupal 7.4 on localhost, and I've downloaded some themes/modules but I'm unable to install them. I go to administration/modules, for example, select 'Upload a module or theme archive to install', choose the tar.gz from my file system, and before the install I'm asked for a FTP user and password and can not advance.
I'm working locally, so I'm thinking maybe I made some mistake during the install. How can I correct this? I have to do a lot of testing on local before moving the site to a server.
I found the solution here. All I have to do is place the modules/themes inside drupal_folder/sites/default/modules or themes and that's it.
Thanks #nmc
This can happen when sites/default folder is not owned by the user that executes the install script. Make sure the folder sites/default is owned by the apache user (from your drupal root):
Ubuntu:
chown www-data sites/default
Fedora:
chown apache sites/default
If your not able to install the module, because the lack of a ftp connection, it's possible to use the old fashion way.
The other solution has described it, but it's not correct for a 100%.
If you want to do it the drupal way, you need to install the modules/themes to
drupalfolder/sites/all/modules
or
drupalfolder/sites/all/themes
if you are having a multi-installation of drupal, then:
drupalfolder/sites/domain_name/modules
or
drupalfolder/sites/domain_name/themes

Resources