cannot import scripts because upload_tmp_dir is not writable if apache user is not www-data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phpmyadmin (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
If the Apache user is different from the default www-data, phpmyadmin cannot import SQL scripts because only www-data has write permission on the upload_tmp_dir configured in /etc/phpmyadmin
This could be solved by either:
- making /var/lib/
- making /var/lib/
- not specifying a custom upload_tmp_dir, so that it falls back to the default /tmp or whatever apache-writable directory has been configured as upload_tmp_dir for PHP. In that case, that default directory should be added to the open_basedir directories in /etc/phpmyadmin
IMO, it's quite common to change the default apache user (from www-data to the current user, for example), especially for web developers (it releaves the pain of setting write permissions on web-app folders during development).
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: phpmyadmin 4:3.4.10.1-1
ProcVersionSign
Uname: Linux 3.2.0-27-generic x86_64
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Fri Aug 31 11:00:30 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=it_IT.UTF-8
SHELL=/bin/bash
SourcePackage: phpmyadmin
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
It is Debian Policy that www-data is the Apache user and packages may rely on that. You're of course free to change it, but it's up to you to change other paths owned by www-data aswell (a simple find command will do that for you).
'Detecting' what the Apache user is in every package that ships a web app seems error-prone. Setting the dir world-writable is obviously not desirable.