cannot import scripts because upload_tmp_dir is not writable if apache user is not www-data

Bug #1044286 reported by lorenzo carrara
14
This bug affects 2 people
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/apache.conf (which is /var/lib/phpmyadmin/tmp by default).
This could be solved by either:

- making /var/lib/phpmyadmin/tmp world-writable during install
- making /var/lib/phpmyadmin/tmp writable by the apache user at the time of install
- 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/apache.conf during install.

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
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
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)
PackageArchitecture: all
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..etc.phpmyadmin.config.inc.php: 2012-07-11T11:29:54.857390

Revision history for this message
lorenzo carrara (lorecarra) wrote :
Revision history for this message
Thijs Kinkhorst (kink) wrote :

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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in phpmyadmin (Ubuntu):
status: New → Confirmed
Revision history for this message
Michal Čihař (nijel) wrote :

Closing as invalid, see Thijs's comment above.

Changed in phpmyadmin (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.